|
Returns the JSON tokens contained within a JSON buffer, one at a time. More...
#include <az_json.h>
Data Fields | |
az_json_token | token |
int32_t | current_depth |
az_span | json_buffer |
The first buffer containing the JSON payload. | |
az_span * | json_buffers |
int32_t | number_of_buffers |
int32_t | buffer_index |
int32_t | bytes_consumed |
The number of bytes consumed so far in the current buffer segment. | |
int32_t | total_bytes_consumed |
bool | is_complex_json |
_az_json_bit_stack | bit_stack |
A limited stack to track the depth and nested JSON objects or arrays read so far. | |
az_json_reader_options | options |
A copy of the options provided by the user. | |
Returns the JSON tokens contained within a JSON buffer, one at a time.
int32_t az_json_reader::buffer_index |
The current buffer segment being processed while reading the JSON in non-contiguous buffer segments.
int32_t az_json_reader::current_depth |
The depth of the current token. This read-only field tracks the recursive depth of the nested objects or arrays within the JSON text processed so far, and it shouldn't be modified by the caller.
bool az_json_reader::is_complex_json |
Flag which indicates that we have a JSON object or array in the payload, rather than a single primitive token (string, number, true, false, null).
az_span* az_json_reader::json_buffers |
The array of non-contiguous buffers containing the JSON payload, which will be null for the single buffer case.
int32_t az_json_reader::number_of_buffers |
The number of non-contiguous buffer segments in the array. It is set to one for the single buffer case.
az_json_token az_json_reader::token |
This read-only field gives access to the current token that the az_json_reader has processed, and it shouldn't be modified by the caller.
int32_t az_json_reader::total_bytes_consumed |
The total bytes consumed from the input JSON payload. In the case of a single buffer, this is identical to bytes_consumed.