Lines Matching +full:string +full:- +full:array +full:- +full:enum

4  * SPDX-License-Identifier: Apache-2.0
26 enum json_tokens {
27 /* Before changing this enum, ensure that its maximum
55 enum json_tokens type;
83 * power of 2 in order to keep this value in the 0-3 range
91 /* Valid values here (enum json_tokens): JSON_TOK_STRING,
110 } array; member
120 * @param data User-provided pointer
157 .field_name_len = sizeof(#field_name_) - 1, \
167 * @param sub_descr_ Array of json_obj_descr describing the subobject
190 .field_name_len = (sizeof(#field_name_) - 1), \
204 * in the array
206 * @param union_ Optional macro argument containing array or object descriptor
220 * @internal @brief Helper macro to declare an array descriptor
222 * @param elem_descr_ Element descriptor, pointer to a descriptor array
227 .array = { \
236 * @param elem_descr_ Element descriptor, pointer to a descriptor array
248 * @brief Helper macro to declare a descriptor for an array of primitives
252 * @param max_len_ Maximum number of elements in array
254 * in the array
264 * struct json_obj_descr array[] = {
274 .field_name_len = sizeof(#field_name_) - 1, \
277 .array = { \
285 * @brief Helper macro to declare a descriptor for an array of objects
288 * @param field_name_ Field name in the struct containing the array
289 * @param max_len_ Maximum number of elements in the array
291 * in the array
292 * @param elem_descr_ Element descriptor, pointer to a descriptor array
312 * struct json_obj_descr array[] = {
323 .field_name_len = sizeof(#field_name_) - 1, \
326 .array = { \
335 * @brief Helper macro to declare a descriptor for an array of array
338 * @param field_name_ Field name in the struct containing the array
339 * @param max_len_ Maximum number of elements in the array
341 * in the array
342 * @param elem_descr_ Element descriptor, pointer to a descriptor array
382 .field_name_len = sizeof(#field_name_) - 1, \
385 .array = { \
402 * @param json_field_name_ String, field name in JSON strings
403 * @param struct_field_name_ Field name in the struct containing the array
404 * @param max_len_ Maximum number of elements in the array
406 * in the array
407 * @param elem_descr_ Element descriptor, pointer to a descriptor array
417 .field_name_len = sizeof(#json_field_name_) - 1, \
420 .array = { \
437 * @param json_field_name_ String, field name in JSON strings
449 .field_name_len = sizeof(json_field_name_) - 1, \
461 * @param json_field_name_ String, field name in JSON strings
463 * @param sub_descr_ Array of json_obj_descr describing the subobject
472 .field_name_len = (sizeof(json_field_name_) - 1), \
488 * @param json_field_name_ String, field name in JSON strings
490 * @param max_len_ Maximum number of elements in array
492 * in the array
503 .field_name_len = sizeof(json_field_name_) - 1, \
506 .array = { \
520 * @param json_field_name_ String, field name of the array in JSON strings
521 * @param struct_field_name_ Field name in the struct containing the array
522 * @param max_len_ Maximum number of elements in the array
524 * in the array
525 * @param elem_descr_ Element descriptor, pointer to a descriptor array
545 * struct json_obj_descr array[] = {
547 * "people-heights", heights,
560 .field_name_len = sizeof(json_field_name_) - 1, \
563 .array = { \
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
592 * @param descr Pointer to the descriptor array
593 * @param descr_len Number of elements in the descriptor array. Must be less
606 * @brief Parses the JSON-encoded array pointed to by @a json, with
617 * struct json_obj_descr array[] = {
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
631 * @param descr Pointer to the descriptor array
634 * @return 0 if array has been successfully parsed. A negative value
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
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
653 * @return 0 if array start is detected and initialization is successful or negative error
659 * @brief Parse a single object from array.
661 * Parses the JSON-encoded object pointed to by @a json object array, with
664 * @param json Pointer to JSON-object message state
665 * @param descr Pointer to the descriptor array
666 * @param descr_len Number of elements in the descriptor array. Must be less than 31.
676 * @brief Escapes the string so it can be used to encode JSON objects
678 * @param str The string to escape; the escape string is stored the
684 * @return 0 if string has been escaped properly, or -ENOMEM if there
690 * @brief Calculates the JSON-escaped string length
692 * @param str The string to analyze
693 * @param len String size
700 * @brief Calculates the string length to fully encode an object
702 * @param descr Pointer to the descriptor array
703 * @param descr_len Number of elements in the descriptor array
713 * @brief Calculates the string length to fully encode an array
715 * @param descr Pointer to the descriptor array
727 * @param descr Pointer to the descriptor array
728 * @param descr_len Number of elements in the descriptor array
741 * @brief Encodes an array in a contiguous memory location
743 * @param descr Pointer to the descriptor array
758 * @param descr Pointer to the descriptor array
759 * @param descr_len Number of elements in the descriptor array
773 * @brief Encodes an array using an arbitrary writer function
775 * @param descr Pointer to the descriptor array