Open Alex-Thunder-315 opened 5 months ago
Obtaining individual data out of array is not yet supported by the library.
This sounds like a useful idea to add. "list[1].a" (with Modelica-like one-based indexing) might be some proper identifier for your task. (Note that there is no array-syntax support in the underlying parson lib itself).
Thanks for the answer. Yes, it would be great if processing of such json files was added.
If we have the next json:
{ "a" : 1.0, "b" : 2.0 }
then we can get the value "a" using getReal("a").How to get the value "a" for example of the first element "list" for the following example:
{ "list" : [ { "a" : 1, "b" : 2 }, { "a" : 2, "b" : 1 } ] }
In the examples there is a case when an array of values is considered, but such a case is not considered, thanks.