I wanted to know if this is the right approach or not, or does XPathGetValues has the ability to directly parse into records?
Another question I had is if my JSON file contains array of strings for example, JSONReader refuses to parse it. So I’d always need to go into the file and wrap the array in an object (eg. I have to convert ["a", "b"] to {"data": ["a", "b"]}. Is this a requirement that I cannot avoid?
Not as such really, the closest actual example is your third image.
You would need first to deserialize data and create Objects from XML definitions.
It would be really helpful to check via the Help Browser (press F1) specifically the Category CoreLib → IO → Serialization.
“Deseialize ThirdParty Data” example and additionally how to “Register Custom Serializer”.
Regarding JSONReader I dont have much to add, maybe separate the two questions in different threads ?
Another solution I have discovered is to use DeserializeJson from VL.Serialization.MessagePack. This can be useful if the JSON is not complicated and you don’t want to create a C# project for it.
VL.Serialization.MessagePack comes preinstalled in vvvv.