DAW JSON Link
|
Parsing single members from the JSON data is common. This can be to discriminate on a single member or when only a single member is needed.
With the previous JSON data, the next example will extract the member "member2.b"
, the "b"
member of the "member2"
member of the root object.
To see a working example using this code, refer to cookbook_parsing_individual_members1_test.cpp.
b_value
should have a value of "found me"
Below shows when member is known to be an array and full control of the resulting collection is needed.
Too see a working example using this code, refer to cookbook_parsing_individual_members2_test.cpp.
In the member path array indexes are specified inside square brackets [
and ]
. Below the 3rd item of "member1"
will be extracted
Too see a working example using this code, refer to cookbook_parsing_individual_members3_test.cpp.