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


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.