Azure SDK for Embedded C
Data Fields
az_json_reader Struct Reference

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_spanjson_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.
 

Detailed Description

Returns the JSON tokens contained within a JSON buffer, one at a time.

Remarks
The token field is meant to be used as read-only to return the az_json_token while reading the JSON. Do NOT modify it.

Field Documentation

◆ buffer_index

int32_t az_json_reader::buffer_index

The current buffer segment being processed while reading the JSON in non-contiguous buffer segments.

◆ current_depth

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.

◆ is_complex_json

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).

◆ json_buffers

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.

◆ number_of_buffers

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.

◆ token

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.

◆ total_bytes_consumed

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.


The documentation for this struct was generated from the following file: