json_encoder_get_status()

Get the error status of the JSON encoder

Synopsis:

#include <sys/json.h>
json_encoder_error_t json_encoder_get_status(
                                            const json_encoder_t *encoder);

Arguments:

encoder
The JSON encoder instance.

Library:

libjson

Description:

This function gets the error status of the given JSON encoder. The encoder's status is sticky, so if an encoding operation fails, all subsequent calls will show the failure until the status is reset through a call to json_encoder_cleanup(), json_encoder_reset(), or json_encoder_set_state().

Returns:

The current error status of the encoder (see json_encoder_error_t).