-
Notifications
You must be signed in to change notification settings - Fork 10
Description
I'm trying to deserialise a JSON document containing variable field names, and I'm unsure how to do this using JKI JSON.
For example, consider the following document:
{
"abs_bar": {
"messageId": 500,
"canPort": 1,
"repeatRate": 50
},
"foo": {
"messageId": 10,
"canPort": 0,
"repeatRate": 50
}
}I don't know the fields of the document in advance - I'd like to deserialise this to a dictionary where the key is the "message definition name" and the value is a "message definition" cluster, and go from there. I've been able to do this pretty easily in Python and C#, but unfortunately LabVIEW is not a very nice language and most things take a lot more effort in it.
LabVIEW does not have the native concept of a "map", so I attempted to deserialise this as an array of clusters, where each cluster contains a string (for the name) and a "message definition" cluster.
I didn't really expect this to work and it doesn't seem to. This is what I see on the front panel after running this:
What's the proper way to go about this?

