JSON Decoding and Encoding API

In the JSON library's API, there are two main areas: the decoder and the encoder functionality.

The decoder functionality lets you read JSON data, navigate the objects and arrays within the data, and read and get metadata about individual values. This saves you from writing a parser to read and store complex, multi-layered data.

The encoder functionality lets you write JSON data in a field-by-field manner. This saves you from having to manually format the data with braces, newlines, and tabs. You can then get a pointer to the JSON string stored in an encoder and send that string to the appropriate output.

For decoders and encoders, you can retrieve information on any errors that occurred while reading or writing JSON data. You can also clean up the memory, or save, restore, and reset the state of a decoder or encoder.

The API also includes functions for writing formatted JSON data to a charater array (string), allowing you to generate your own JSON data.