APG
… an ABNF Parser Generator
|
The structure of a JSON value. More...
#include <json.h>
Data Fields | |
aint | uiId |
The type of value. One of. More... | |
u32_phrase * | spKey |
Points to the associated key string if this is a member of a JSON object. Otherwise, NULL. More... | |
union { | |
u32_phrase * spString | |
Pointer to the string value if uiId = JSON_ID_STRING. More... | |
json_number * spNumber | |
Pointer to the number value if uiId = JSON_ID_NUMBER. More... | |
struct { | |
struct json_value_tag ** sppChildren | |
Points to a list of child value pointers if uiId is JSON_ID_OBJECT or JSON_ID_ARRAY. More... | |
aint uiChildCount | |
The number of child values if uiId is JSON_ID_OBJECT or JSON_ID_ARRAY. More... | |
} | |
}; | |
The structure of a JSON value.
The json
specification defines seven different value types – object, array, string, number, true, false and null. This APG JSON parser equalizes the handling of them all with this structure/union. Any one of these value types can be represented with this structure, including object members, which are treated as values with the addition of a key string.
union { ... } |
u32_phrase* json_value_tag::spKey |
json_number* json_value_tag::spNumber |
struct json_value_tag** json_value_tag::sppChildren |
u32_phrase* json_value_tag::spString |
aint json_value_tag::uiChildCount |
aint json_value_tag::uiId |