json_decoder_parse_file()

Parse a file of JSON data

Synopsis:

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

Arguments:

decoder
The JSON decoder instance.
file
The path to a file containing JSON data.

Library:

libjson

Returns:

See also:

json_decoder_error_t & json_decoder_get_parse_error()

JSON_DECODER_OK
Success.
JSON_DECODER_FILE_READ_ERROR
An error occurred retrieving the JSON data from the file. The specific error is indicated by errno.
JSON_DECODER_PARSE_ERROR
An error occurred parsing the JSON data. Use json_decoder_get_parse_error() to determine the location and reason for the error.