Return the type of the JSON value (a json_type cast to Is represented by a value of the type JSON_TRUE and false by a A number is represented by either a value of the type These correspond to JSON object, array, string, number, boolean and The following members are defined: JSON_OBJECT Invalid arguments or invalid input areĪpparent sources for errors. Depending on the function’s signature, the error value Unless noted otherwise, all API functions return an error value if anĮrror occurs. ThereĪre APIs for querying the type, manipulating the reference count, andįor constructing and manipulating values of different types.
Objects of json_t are always used through a pointer. It always contains the type of the JSON value it holdsĪnd the value’s reference count. This data structure is used throughout the library to represent all Values, and this structure knows the type of the JSON value it holds. For this reason, Jansson’s type system isĪlso dynamic in nature. Types are used dynamically arrays and objects can hold any other data Object, array, string, number, boolean, and null. The JSON specification ( RFC 4627) defines the following data types: This is useful in numeric comparisons, e.g.: "1.2.1" orĪ 3-byte hexadecimal representation of the version, e.g.Ġx010201 for version 1.2.1 and 0x010300 for version 1.3. JANSSON_VERSION A string representation of the current version, e.g. The library: JANSSON_MAJOR_VERSION, JANSSON_MINOR_VERSION, JANSSON_MICRO_VERSION Integers specifying the major, minor and micro versions, The following preprocessor constants specify the current version of Incompatible changes, the major version is incremented and others are When new features areĪdded in a backwards compatible way, the minor version is incrementedĪnd the micro version is set to zero. When a new release only fixes bugs and doesn’t add new features orįunctionality, the micro version is incremented.
Micro version is zero, it’s omitted from the version string, i.e. Version, B is the minor version and C is the micro version. The Jansson version is of the form A.B.C, where A is the major