Finally, after several search and try, I am using the following code which is simple.
Here we try to read a json file with a node NN Json Get

The json file, called DT.json to read
{
“fruits”: [
{ “kiwis”: 3,
“mangues”: 4,
“pommes”: null
},
{ “panier”: true }
],
“legumes”: {
“patates”: “amandine”,
“poireaux”: false
},
“viandes”: [“poisson”,“poulet”,“boeuf”]
}
**The interesting part of the NNJsonGetNode code **
class NNJsonGetNode extends LogicNode {
.....
override function run() {
var value:String = inputs[1].get();
var adr = "http://localhost:8040/Data/" + value;
var http = new haxe.Http(adr);
http.onData = function (data:String) {
var res:{method:String,fruits:Array<Dynamic>} = haxe.Json.parse(data);
trace("-------------------fruits-----------------------");
for (n in res.fruits) {
trace(n);
}
var res1 = haxe.Json.parse(data);
trace("-------------------legumes-----------------------");
for (n in Reflect.fields(res1.legumes))
trace(Reflect.field(res1.legumes, n));
var res2:{method:String,viandes:Array<Dynamic>} = haxe.Json.parse(data);
trace("------------------viandes------------------------");
for (n in res2.viandes) {
trace(n);
}
}
http.onError = function (error) {
trace('error: $error');
}
http.request();
super.run();
}
....
tadaaa, in the console of the firefox browser, the result.
