Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
Data Fields
value_r Struct Reference

This is the "relative" value developed during parsing. More...

#include <jsonp.h>

Data Fields

aint uiId
 The value identifier, JSON_ID_OBJECT, etc. More...
 
aint uiKey
 If uiID is JSON_ID_OBJECT, offset to the key's string. Otherwise, zero and not used. More...
 
aint uiChildCount
 if uiId is JSON_ID_OBJECT or JSON_ID_ARRAY, the number of members or values. More...
 
aint uiChildListOffset
 Offset from the base of the vector of child value pointers. More...
 
union {
   aint   uiString
 Offset to a string_r if JSON_ID_STRING. More...
 
   aint   uiNumber
 Offset to a number if JSON_ID_NUMBER. More...
 
}; 
 Space-saving union – only one of this is needed at a time, depending on the id. More...
 

Detailed Description

This is the "relative" value developed during parsing.

Because parsed values are pushed on vectors, the base of the vector may change with any push. Therefore, we must keep only relative indexes to the relevant items. During post-parse processing these relative indexes will be converted to absolute pointers. See json_value_tag.

Definition at line 68 of file jsonp.h.

Field Documentation

◆ @13

union { ... }

Space-saving union – only one of this is needed at a time, depending on the id.

◆ uiChildCount

aint value_r::uiChildCount

if uiId is JSON_ID_OBJECT or JSON_ID_ARRAY, the number of members or values.

Definition at line 71 of file jsonp.h.

◆ uiChildListOffset

aint value_r::uiChildListOffset

Offset from the base of the vector of child value pointers.

Definition at line 72 of file jsonp.h.

◆ uiId

aint value_r::uiId

The value identifier, JSON_ID_OBJECT, etc.

Definition at line 69 of file jsonp.h.

◆ uiKey

aint value_r::uiKey

If uiID is JSON_ID_OBJECT, offset to the key's string. Otherwise, zero and not used.

Definition at line 70 of file jsonp.h.

◆ uiNumber

aint value_r::uiNumber

Offset to a number if JSON_ID_NUMBER.

Definition at line 75 of file jsonp.h.

◆ uiString

aint value_r::uiString

Offset to a string_r if JSON_ID_STRING.

Definition at line 74 of file jsonp.h.


The documentation for this struct was generated from the following file:
APG Version 7.0 is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.