JSON parser configuration. More...
Data Fields | |
uint16_t | buffer_len |
Optional, buffer containing pre-read data, or processing buffer for 'reader' if NULL then a processing buffer of size 'buffer_len' is allocated with the context. | |
json_parse_reader_t | reader |
Length of buffer. More... | |
json_token_callback_t | token_callback |
Optional, reader callback, continuously called by parser while there's more JSON data to be read, leave NULL if JSON data is pre-read and stored in 'buffer' member. More... | |
Detailed Description
JSON parser configuration.
This struct configures the JSON parsing context. It should be called with json_parse_context_init() to allocated a json_parse_context_t context.
- Examples:
- basic/display_stream/display_stream.c, basic/http_server/json_parser_request_processor.c, basic/json_parser/parse_all_examples.c, basic/json_parser/parse_example1.c, basic/json_parser/parse_example2.c, basic/json_parser/parse_example3.c, basic/json_parser/parse_example9.c, nxp/nfc3d/cloud_rest.c, and nxp/nfc3d/cloud_websocket.c.
Field Documentation
json_parse_reader_t json_parse_config_t::reader |
Length of buffer.
This is either the length of pre-read JSON data or length of read's processing buffer.
json_token_callback_t json_parse_config_t::token_callback |
Optional, reader callback, continuously called by parser while there's more JSON data to be read, leave NULL if JSON data is pre-read and stored in 'buffer' member.
Note: both 'buffer' and 'buffer_len' are required, they're passed as arguments to the 'reader' callback