json_decoder_dump_tree()

Dump the tree contents of a JSON decoder

Synopsis:

#include <sys/json.h>
void json_decoder_dump_tree(json_decoder_t *decoder,
                            FILE *fp);

Arguments:

decoder
The JSON decoder instance.
fp
The file pointer to write the tree contents to.

Library:

libjson

Description:

This function writes the tree contents of the specified JSON decoder in a human-readable format to the given FILE pointer. It is meant for debugging purposes. If you encounter errors when trying to extract data from a JSON decoder, it might be because you forgot to push into an array or object or to pop out of one. To help debug the problem, you can call json_decoder_dump_tree() to see what the decoder looks like in its current state.