Message Boards Message Boards

0
|
14206 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

API - validatequery response format problems

Posted 10 years ago

Hi everyone!

I'm having a strange output from Wolfram|Alpha API and I would like to talk about it with you.

Talking about the "validatequery" method, if my query has an error, here is the output (a pseudo-json):

     WrapValidateQueryResult[{If[API`ValidateQuery`Private`mClientVersion > 0,
     $ServletRequest[API`ValidateQuery`Private`getAttribute["mErrorMessage"]], Null]["error", {},
     {If[API`ValidateQuery`Private`mClientVersion > 0,
     $ServletRequest[API`ValidateQuery`Private`getAttribute["mErrorMessage"]], Null]["code", {}, 
     {"1"}], If[API`ValidateQuery`Private`mClientVersion > 0,
     $ServletRequest[API`ValidateQuery`Private`getAttribute["mErrorMessage"]], Null]["msg", {}, 
     {"Invalid appid"}]}]}, False, True, 0.013976`4.5969278854708495, 0, ""]

If the query has no errors, I get normal XML output, as expected.

Now, I didn't read anything about this in the documentation... it is a normal thing? I think it would be more comfortable to have a single format, for more consistency! :)

Let me know if you too stumbled across this!

2 Replies
POSTED BY: Bruce Miller
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract