[Fiware-developer-experience] Minor Issue in JSON response

Pablo Fernández Moniz pablofernandezmoniz at gmail.com
Wed Jul 22 16:49:49 CEST 2015


Hi!

We have downloaded the new images and now we have a problem parsing the
JSON response for the http://compose_devguide_1/api/orion/restaurants/
 petition.

Concretely, we get the an  "SyntaxError: JSON.parse: bad control character
in string literal at line 65332 column 120 of the JSON data" error when we
use the *JSON.parse* function.

If we used a online JSON validator (wich could be
http://www.freeformatter.com/json-validator.html
<http://www.freeformatter.com/json-validator.html>or
http://jsonformatter.curiousconcept.com/
<http://jsonformatter.curiousconcept.com/>)  using the response, it doesn't
pass it.

One of the detected errors is the use of doble quotes inside strings. An
example of this issue of the Zarate restaurant can be examined in the image
[QuoteError]

Also we still have no data on reservations, is that what we have to expect
for the moment?

Maybe we are doing something wrong?

Another minor issue is that the API is not providing a JSON response
although we
use the Accept: application/json header. The API always return a tex/html
as Content-Type, see [NotJSONResponse]

Do you think possible, or recommendable, to return the response directly as
JSON format? This should makes a little easier to parse the content from
the front end.

KR

ULPGC Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-developer-experience/attachments/20150722/85c49f3e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notJSONResponse.png
Type: image/png
Size: 392315 bytes
Desc: not available
URL: <https://lists.fiware.org/private/fiware-developer-experience/attachments/20150722/85c49f3e/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QuoteError.png
Type: image/png
Size: 158861 bytes
Desc: not available
URL: <https://lists.fiware.org/private/fiware-developer-experience/attachments/20150722/85c49f3e/attachment-0001.png>


More information about the Fiware-developer-experience mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy