JSON_Decode

Dear PLCNext Team, I am new to PLCNext, and I have one quesiton regarding ‚JSON_Decoder‘. I have a string let’s take for example: ‚{„start“:„2020-11-26“}‘. I would like to do JSON_Decode of this string, and I am interested to ‚Get_Value‘ of .‚start=‘ . I have gone through example of JSON_Decode example which is given in help function and library example, but it showing to create Json tree, which will store in ‚‘/opt/plcnext/JsonValueTree.json’'. And then Get_Value from that JsonTree. But my question is that, is there any alternative possibility to do JSON_Decode and Get _Value without storing JsonValueTree in PLCNext directory (/opt/plcnext/JsonValueTree.json)? Thank you in advance. With Best Regards, Kishan Kothiya

Hello Kishan, Here is a short demonstration showing how to decode the JSON in your example, and retrieve the value of the .start element. I hope this helps. ~ Martin.

Factory IO 2022-09-01 13_49_58.png
Factory IO 2022-09-01 13_47_49.png
Replace Hostname 2022-09-01 14_43_58.png
Replaced Hostname 2022-09-01 14_45_14.png

Dear Mr. Martin, Thank you very much for your explanation with detailed visualization. Now, its work for me too. With Best Regards, Kishan

Dear Mr. Martin, Thank you very much for your explanation with detailed visualization. Now, its work for me too. With Best Regards, Kishan