Descend into an array
Synopsis:
#include <sys/json.h>
json_decoder_error_t json_decoder_push_array(json_decoder_t *decoder,
const char *name,
bool optional);
Arguments:
- decoder
- The JSON decoder instance.
- name
- The name of the array to descend into, or NULL to descend into the current array.
- optional
- Indicates if the presence of this array is optional. When descending into an optional array, the decoder will not register an error status if the array does not exist.
Library:
libjson
Description:
This function positions the decoder within the specified array or the current array. If the call succeeds, subsequent calls can be made to return the nodes representing the elements of the array.
Returns:
- JSON_DECODER_OK
- Success.
- JSON_DECODER_BAD_TYPE
- The specified node is not an array.
- JSON_DECODER_NOT_FOUND
- The specified node does not exist.