json_decoder_parse_json_str()

Parse a string of JSON data

Synopsis:

#include <sys/json.h>
json_decoder_error_t json_decoder_parse_json_str(json_decoder_t *decoder,
                                                 const char *str);

Arguments:

decoder
The JSON decoder instance.
str
A pointer to a null-terminated string containing JSON data.

Library:

libjson

Returns:

See also:

json_decoder_error_t & json_decoder_get_parse_error()

JSON_DECODER_OK
Success.
JSON_DECODER_PARSE_ERROR
An error occurred parsing the string. Use json_decoder_get_parse_error() to determine the location and reason for the error.