Failed to parse response

Failed to parse response

  

This is my first post here and I do have tiny bit of OutSystems experience.

I'm doing the "Build a Mobile App in 2 hours." and I get error while retrieving data from REST call at section "Creating a bootstrap to store the Planet’s Images".

and exception happens here while debugging ( learned to get debugging to get this out). See red arrow below image.


How I should proceed with troubleshooting on this?

Hi Sampsa,

The error means the REST service returns something that's not valid JSON. To troubleshoot, follow the steps I described here, and check what exactly the REST service is returning.

Solution

Thank you for a quick response.

I think I found the reason. The JSON has a field "edited"

Example:

..
"thumbnail": "self",
"edited": 1535282226.0,
"author_flair_css_class": null,

..

But now the some of the field values were:

..

"edited": false

..

The "Data type" at structure was defined as "Decimal". So I changed it as "Text" and it seemed to work.


Solution

Mmm, weird, the number looks like a valid Decimal... Anyway, great you found a workaround.

Kilian Hekhuis wrote:

Mmm, weird, the number looks like a valid Decimal... Anyway, great you found a workaround.

I did edit my own response. The edited value was "false". Not a Decimal. 

Anyway as OutSystem newbie and future professional I found already new feature that should be improved. Now I mean how OS JSON parsing is giving error message on this point.

If it was "false", the field is likely a Boolean, and you could try to set it to that (instead of Text).