170#define JSON_Search( buf, max, query, queryLength, outValue, outValueLength ) \
171 JSON_SearchT( buf, max, query, queryLength, outValue, outValueLength, NULL )
178#define MAX_INDEX_VALUE ( 0x7FFFFFF7 )
215 size_t * outValueLength,
237 const char ** outValue,
238 size_t * outValueLength,
JSONStatus_t JSON_SearchConst(const char *buf, size_t max, const char *query, size_t queryLength, const char **outValue, size_t *outValueLength, JSONTypes_t *outType)
Same as JSON_SearchT(), but with const qualified buf and outValue arguments.
Definition: core_json.c:1621
JSONStatus_t JSON_SearchT(char *buf, size_t max, const char *query, size_t queryLength, char **outValue, size_t *outValueLength, JSONTypes_t *outType)
Same as JSON_Search(), but also outputs a type for the value found.
Definition: core_json.c:1671
JSONStatus_t JSON_Iterate(const char *buf, size_t max, size_t *start, size_t *next, JSONPair_t *outPair)
Output the next key-value pair or value from a collection.
Definition: core_json.c:1762
JSONStatus_t JSON_Validate(const char *buf, size_t max)
Parse a buffer to determine if it contains a valid JSON document.
Definition: core_json.c:1123
JSONStatus_t
Return codes from coreJSON library functions.
Definition: core_json.h:45
JSONTypes_t
Value types from the JSON standard.
Definition: core_json.h:185
@ JSONNotFound
Query key could not be found in the JSON document.
Definition: core_json.h:50
@ JSONIllegalDocument
JSON document is invalid or malformed.
Definition: core_json.h:48
@ JSONSuccess
JSON document is valid and complete.
Definition: core_json.h:47
@ JSONBadParameter
Query key is empty, or any subpart is empty, or max is 0.
Definition: core_json.h:52
@ JSONMaxDepthExceeded
JSON document has nesting that exceeds JSON_MAX_DEPTH.
Definition: core_json.h:49
@ JSONNullParameter
Pointer parameter passed to a function is NULL.
Definition: core_json.h:51
@ JSONPartial
JSON document is valid so far but incomplete.
Definition: core_json.h:46
@ JSONObject
A collection of zero or more key-value pairs.
Definition: core_json.h:192
@ JSONNull
The literal value null.
Definition: core_json.h:191
@ JSONNumber
A rational number.
Definition: core_json.h:188
@ JSONTrue
The literal value true.
Definition: core_json.h:189
@ JSONString
A quote delimited sequence of Unicode characters.
Definition: core_json.h:187
@ JSONArray
A collection of zero or more values.
Definition: core_json.h:193
@ JSONFalse
The literal value false.
Definition: core_json.h:190
@ JSONInvalid
Not a valid JSON type.
Definition: core_json.h:186
Structure to represent a key-value pair.
Definition: core_json.h:247
const char * value
Pointer to the code point sequence for value.
Definition: core_json.h:250
size_t keyLength
Length of the code point sequence for key.
Definition: core_json.h:249
JSONTypes_t jsonType
JSON-specific type of the value.
Definition: core_json.h:252
size_t valueLength
Length of the code point sequence for value.
Definition: core_json.h:251
const char * key
Pointer to the code point sequence for key.
Definition: core_json.h:248