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

Pablo Fernández Moniz pablofernandezmoniz at gmail.com
Thu Jul 23 10:21:20 CEST 2015


Great!

   It seems to be working now.

     We force the delete of all dockers and download the again.

Thank you,

2015-07-22 23:26 GMT+01:00 David Muriel <dmuriel at bitergia.com>:

> On Wed, Jul 22, 2015 at 4:49 PM, Pablo Fernández Moniz
> <pablofernandezmoniz at gmail.com> wrote:
> > Hi!
>
> Hello,
>
> > 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 or
> > http://jsonformatter.curiousconcept.com/ )  using the response, it
> doesn't
> > pass it.
>
> I've tried http://www.freeformatter.com/json-validator.html and it says:
>
>   The JSON input is valid in JavaScript.
>   The JSON input is valid according to RFC 4627 (JSON specfication).
>
> > 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]
>
> Yesterday (tuesday 21st) we pushed the fix for this bug.  I'm testing
> it right now with the latest images and it's returning the quotes
> properly escaped.  Also, are you loading the data via the
> restaurant_feeder.js script or using the preloaded data image?  Maybe
> we didn't notify you of this fix, sorry.
>
> > Also we still have no data on reservations, is that what we have to
> expect
> > for the moment?
>
> The preloaded data image has data for reservations and reviews
> (created via the reservations_generator.js and reviews_generator.js
> scripts).
>
> > 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.
>
> I've just pushed a fix to add the header when returning JSON data from
> orion.  A new version of the fiware-devguide-app image has just
> finished building on docker hub.
>
> Regards,
>
> --
> David Muriel.
> _______________________________________________
> Fiware-developer-experience mailing list
> Fiware-developer-experience at lists.fiware.org
> https://lists.fiware.org/listinfo/fiware-developer-experience
>



-- 

Pablo Fernández Moniz
GIT Analyst

Web <http://www.pablofm.com>    Linkedin
<http://www.linkedin.com/in/pablofernandezmoniz/>   Twitter
<http://www.twitter.com/monizpablo>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-developer-experience/attachments/20150723/5717d925/attachment.html>


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