[CLOSED] IsJSON crashing ?



Samuel

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


David

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...


Consider to purchase one or more licenses of our products if they are useful to you!

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 :)


David

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).


Consider to purchase one or more licenses of our products if they are useful to you!

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.