JSON decoder functionality
QNX SDP8.0JSON Library ReferenceAPIDeveloper
The decoder API functions let you read JSON data from a string or a file. The data are stored in a decoder tree that reflects the hierarchy of the JSON fields. You can navigate the tree by pushing into and popping out of objects and arrays, moving to the next and previous object properties or array elements, and jumping to a specific property or node index.
The API lets you read the object property names and values as well as the values in arrays. There are functions for reading the following value types:
- boolean
- numeric, including
int
,long
long
, anddouble
- string
You can create a special-purpose encoder for adding or changing values within the decoder tree. To keep track of when the contents change, you can read and store the current data version, which increments whenever the content is modified, or the decoder is reset or cleaned up.
Page updated: