json_decoder_set_state()

Set the state of the JSON decoder

Synopsis:

#include <sys/json.h>
json_decoder_error_t json_decoder_set_state(json_decoder_t *decoder,
                                            json_decoder_state_t *state);

Arguments:

decoder
The JSON decoder instance.
state
A pointer to a JSON decoder state instance containing the new state.

Library:

libjson

Description:

This function restores the given decoder to a state previously obtained with json_decoder_get_state().

Returns:

JSON_DECODER_OK
Success.
JSON_DECODER_INVALID_STATE
The given state pointer was not valid.