|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
Descriptor for a mixed-type JSON array. More...
#include <zephyr/data/json.h>
Data Fields | |
| uint32_t | type: 7 |
| size_t | count_offset |
| union { | |
| struct { | |
| size_t offset | |
| size_t size | |
| } primitive | |
| struct { | |
| const struct json_obj_descr * sub_descr | |
| size_t sub_descr_len | |
| size_t offset | |
| } object | |
| struct { | |
| const struct json_obj_descr * element_descr | |
| size_t n_elements | |
| size_t offset | |
| } array | |
| struct { | |
| const struct json_mixed_arr_descr * sub_descr | |
| size_t sub_descr_len | |
| size_t offset | |
| } mixed_array | |
| }; | |
Descriptor for a mixed-type JSON array.
This structure describes a top-level JSON array whose elements may be of different types (primitives, objects, arrays, or nested mixed arrays). Each element in the array is described by an entry in a descriptor array.
Mixed arrays are useful for parsing and encoding JSON arrays that do not have a homogeneous element type, such as:
[ "string", 42, { "foo": 1 }, [1,2,3], true ]
| union { ... } json_mixed_arr_descr |
| struct { ... } json_mixed_arr_descr::array |
| size_t json_mixed_arr_descr::count_offset |
| const struct json_obj_descr* json_mixed_arr_descr::element_descr |
| struct { ... } json_mixed_arr_descr::mixed_array |
| size_t json_mixed_arr_descr::n_elements |
| struct { ... } json_mixed_arr_descr::object |
| size_t json_mixed_arr_descr::offset |
| struct { ... } json_mixed_arr_descr::primitive |
| size_t json_mixed_arr_descr::size |
| const struct json_obj_descr* json_mixed_arr_descr::sub_descr |
| const struct json_mixed_arr_descr* json_mixed_arr_descr::sub_descr |
| size_t json_mixed_arr_descr::sub_descr_len |
| uint32_t json_mixed_arr_descr::type |