Hello.
I have a web service ( written in lazarus/fpc), one of the functions of this webservice is to send me back a small json file which content is :
{
"system": {
"name": "pp1",
"version": "13.1",
"hostname": "uc1"
},
"config": {
"physical": {
"comments": "this is a comment",
"count": "12",
"activated": "2",
"AItem0": {
"active": "1",
"kername": "itm0"
},
"AItem1": {
"active": "1",
"kername": "itm0"
}
}
}
}
I use Indy IdHttp to retreive this resourse.
var
jsstr: String;
begin
jsstr := IdHttp1.Post(s_URL, sParam) ; // s_URL = url to webservice, sParam = parameters needed.
end;
My question is, is there any simple way out of the way of saving the String into json file and use
GetValue('/config/physical/AItem0/active')
of the TJSConfig.
In other worlds, is there a way to parse the string and get all elements without saving it into file and do with TJsConfig.
Thank you.