[CLOSED] IsJSON crashing ?


Samuel Vanneste

Hello,
On my computer, IsJson generates a crash. I have tested it with the JSON2 example to try just by adding the line to HttpClient Success

Could you please check if it is the same for you ? Thanks

[e] Error: "Exception lifted but not detected" - Line: 306 - Char: 13 - Code: 0 - Url: http://127.0.0.1:9999/app/scripts/app.js
[e] Error: "[$rootScope:inprog] http://errors.angularjs.org/1.6.4/$rootScope/inprog?p0=%24digest" - Line: 141 - Char: 496 - Code: 0 - Url: http://127.0.0.1:9999/builder/scripts/builder.js

CLOSED : Closing. I guess in that example this is an array and the help file speaks about a String... Damn that way of doing things makes me crazy never knowing what comes from which transformation.
Goodbye and sorry


decsoft

Hello Samuel,

Certainly the action may induce to error: what the action expected is an string like you suggested, and not an Object or an Array. Probably in this case you can directly check if the response is an Array, or an Object...



Samuel Vanneste

You are right, David. I am too used to receive rough strings and after that to manipulate them that I always make the error.

Many thanks for your suggestion :)


decsoft

Hello Samuel,

You are right, David. I am too used to receive rough strings and after that to manipulate them that I always make the error.

Many thanks for your suggestion :)

No problem. Just remember that if we receive an JSON object, an Array of Objects, we can start to manipulate it directly using the Http Client's Response variable without the need to convert it or assign it to another variable (if no needed).


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.