Updated: October 28, 2024 |
Set the state of the JSON encoder
#include <sys/json.h>
json_encoder_error_t json_encoder_set_state(json_encoder_t *encoder, json_encoder_state_t *state);
This function restores the given JSON encoder to a state previously obtained with json_encoder_get_state().
This call is not applicable to encoder instances obtained from json_decoder_get_encoder(), since JSON items encoded with these encoders are added directly to the decoder tree rather than into a JSON-formatted buffer.