json_node_type_t

JSON decoder node types

Synopsis:

#include <sys/json.h>
typedef enum {
    JSON_TYPE_NULL,
    JSON_TYPE_BOOL,
    JSON_TYPE_NUMBER,
    JSON_TYPE_STRING,
    JSON_TYPE_ARRAY,
    JSON_TYPE_OBJECT,
    JSON_TYPE_NONE
} json_node_type_t;

Data:

JSON_TYPE_NULL

The node is a null data type.

JSON_TYPE_BOOL

The node is a boolean data type.

JSON_TYPE_NUMBER

The node is a number data type.

JSON_TYPE_STRING

The node is a string data type.

JSON_TYPE_ARRAY

The node is an array containing other elements.

JSON_TYPE_OBJECT

The node is an object containing other properties.

JSON_TYPE_NONE

This type is returned for a non-existent node.

Library:

libjson

Description:

The JSON decoder node types indicate the type of properties in a JSON object or the type of elements in a JSON array. For this API, the term node refers to either an object property or an array element. Enumeration of object properties and array elements is largely the same, aside from the fact that nodes representing array elements do not have an associated name.

Refer to json_decoder_next(), json_decoder_name(), json_decoder_type() and the json_decoder_get_*() functions for more details on node access from the JSON decoder tree.