Lines Matching +full:- +full:- +full:json
4 * SPDX-License-Identifier: Apache-2.0
21 * @defgroup json JSON
83 * power of 2 in order to keep this value in the 0-3 range
99 /* 65535 bytes is more than enough for many JSON payloads. */
116 * encoding JSON data.
120 * @param data User-provided pointer
139 * @param type_ Token type for JSON value corresponding to a primitive
157 .field_name_len = sizeof(#field_name_) - 1, \
190 .field_name_len = (sizeof(#field_name_) - 1), \
274 .field_name_len = sizeof(#field_name_) - 1, \
323 .field_name_len = sizeof(#field_name_) - 1, \
382 .field_name_len = sizeof(#field_name_) - 1, \
397 * structure and JSON field names differ.
399 * This is useful when the JSON field is not a valid C identifier.
402 * @param json_field_name_ String, field name in JSON strings
417 .field_name_len = sizeof(#json_field_name_) - 1, \
432 * structure and JSON field names differ.
434 * This is useful when the JSON field is not a valid C identifier.
437 * @param json_field_name_ String, field name in JSON strings
439 * @param type_ Token type for JSON value corresponding to a primitive
449 .field_name_len = sizeof(json_field_name_) - 1, \
456 * structure and JSON field names differ.
458 * This is useful when the JSON field is not a valid C identifier.
461 * @param json_field_name_ String, field name in JSON strings
472 .field_name_len = (sizeof(json_field_name_) - 1), \
483 * structure and JSON field names differ.
485 * This is useful when the JSON field is not a valid C identifier.
488 * @param json_field_name_ String, field name in JSON strings
503 .field_name_len = sizeof(json_field_name_) - 1, \
515 * the structure and JSON field names differ.
517 * This is useful when the JSON field is not a valid C identifier.
520 * @param json_field_name_ String, field name of the array in JSON strings
547 * "people-heights", heights,
560 .field_name_len = sizeof(json_field_name_) - 1, \
572 * @brief Parses the JSON-encoded object pointed to by @a json, with
583 * Since this parser is designed for machine-to-machine communications, some
587 * (2) no UTF-8 validation is performed; and
590 * @param json Pointer to JSON-encoded value to be parsed
591 * @param len Length of JSON-encoded value
601 int64_t json_obj_parse(char *json, size_t len,
606 * @brief Parses the JSON-encoded array pointed to by @a json, with
622 * Since this parser is designed for machine-to-machine communications, some
626 * (2) no UTF-8 validation is performed; and
629 * @param json Pointer to JSON-encoded array to be parsed
630 * @param len Length of JSON-encoded array
637 int json_arr_parse(char *json, size_t len,
641 * @brief Initialize single-object array parsing
643 * JSON-encoded array data is going to be parsed one object at a time. Data is provided by
646 * Function validate that Json Array start is detected and initialize @a json object for
647 * Json object parsing separately.
649 * @param json Provide storage for parser states. To be used when parsing the array.
650 * @param payload Pointer to JSON-encoded array to be parsed
651 * @param len Length of JSON-encoded array
656 int json_arr_separate_object_parse_init(struct json_obj *json, char *payload, size_t len);
661 * Parses the JSON-encoded object pointed to by @a json object array, with
664 * @param json Pointer to JSON-object message state
672 int json_arr_separate_parse_object(struct json_obj *json, const struct json_obj_descr *descr,
676 * @brief Escapes the string so it can be used to encode JSON objects
684 * @return 0 if string has been escaped properly, or -ENOMEM if there
690 * @brief Calculates the JSON-escaped string length
730 * @param buffer Buffer to store the JSON data
745 * @param buffer Buffer to store the JSON data