mdirzpr13 - 2022-12-16

I want to use WebClient Function Block from Web_Client_SL library in IIOT to PUT an APPLICATION_JSON. For this goal I need to define the PostValue as a WSTRING and then define a Pointer for it to give the pointer as an input to FB. The first problem which I have is that when I give a json file to a WSTRING variable, the compiler returns an error. So what is the proper way to assign this json string in a variable?

For solving this problem, I used the JSON_Utilities_SL library in IIOT to convert a JSON file to a WSTRING. With JSONFileReader FB, I can make a JSONData object. How we can convert this JSONData object to WSTRING?

There is a function called JSONElementToString. For implementing it we need to extract the JSON elements. So I used the GetElementByIndex method to get the JSON elements. But the problem is that, I do not know the number of indexes for an arbitrary JSON file. What should I do?