I'm not sure, if I understand your description correct. I see 2 differnet use cases:
A: Pass the JSON file content, without changing anything
Open file, Read content STRING/WSTRING, Close file
Send WSTRING via Web_Client_SL library
B: Pass the JSON file content, with changing it
Open file, Read content STRING/WSTRING, Close file
Parse string into JSON object
Edit JSON object
Create WSTRING from JSON object
Send WSTRING via Web_Client_SL library
Remarks:
When you do not have to change the content of the JSON object, you do not need the JSON library of CoDeSys.
Just use the library CXA_FileAsync. It's a wrapper around the CoDeSys function, which are really hard to use.
If the file format is STRING, you have to read it as STRING and convert it afterwards to WSTRING
If the file format is WSTRING, you have to read it as WSTRING
In my tests around 1 year ago, the CoDeSys JSON library was not very stable. I would use it only for very basic stuff but not for complex JSON's.
... View more