Updated: April 19, 2023 |
Set the data version for the decoder
#include <sys/json.h>
void json_decoder_set_data_version(json_decoder_t *decoder, int version);
This function sets the data version for the given decoder.
The data version is available purely to provide information to callers about content changes in a decoder instance. The data version is not used internally, so callers may change the value as they wish. The version will be updated automatically when parsing new data with json_decoder_parse_json_str(), removing nodes with json_decoder_remove_node(), or when using the encoder returned from json_decoder_get_encoder() to add or update nodes in the tree.