|
Provides forward-only, non-cached writing of UTF-8 encoded JSON text into the provided buffer. More...
#include <az_json.h>
Data Fields | |
int32_t | total_bytes_written |
az_span | destination_buffer |
The destination to write the JSON into. | |
int32_t | bytes_written |
The bytes written in the current destination buffer. | |
az_span_allocator_fn | allocator_callback |
Allocator used to support non-contiguous buffer as a destination. | |
void * | user_context |
bool | need_comma |
A state to remember when to emit a comma between JSON array and object elements. | |
az_json_token_kind | token_kind |
_az_json_bit_stack | bit_stack |
az_json_writer_options | options |
A copy of the options provided by the user. | |
Provides forward-only, non-cached writing of UTF-8 encoded JSON text into the provided buffer.
_az_json_bit_stack az_json_writer::bit_stack |
The current state of the writer based on the last JSON container it is in (whether array or object), used for validating the correctness of the JSON being written, and so it doesn't overflow the maximum supported depth.
az_json_token_kind az_json_writer::token_kind |
The current state of the writer based on the last token written, used for validating the correctness of the JSON being written.
int32_t az_json_writer::total_bytes_written |
The total number of bytes written by the az_json_writer to the output destination buffer(s). This read-only field tracks the number of bytes of JSON written so far, and it shouldn't be modified by the caller.
void* az_json_writer::user_context |
Any struct that was provided by the user for their specific implementation, passed through to the az_span_allocator_fn.