Skip to content

Commit afe9ee9

Browse files
Sir-BranchMaureenHelm
authored andcommitted
json: cleanup extra line in between macro/function parameters
New line between each parameter which hinders reading of source code Signed-off-by: Ramiro Merello <[email protected]>
1 parent 7a93e9e commit afe9ee9

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

include/data/json.h

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
110110
* values.
111111
*
112112
* @param struct_ Struct packing the values
113-
*
114113
* @param field_name_ Field name in the struct
115-
*
116114
* @param type_ Token type for JSON value corresponding to a primitive
117115
* type. Must be one of: JSON_TOK_STRING for strings, JSON_TOK_NUMBER
118116
* for numbers, JSON_TOK_TRUE (or JSON_TOK_FALSE) for booleans.
@@ -140,9 +138,7 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
140138
* @brief Helper macro to declare a descriptor for an object value
141139
*
142140
* @param struct_ Struct packing the values
143-
*
144141
* @param field_name_ Field name in the struct
145-
*
146142
* @param sub_descr_ Array of json_obj_descr describing the subobject
147143
*
148144
* Here's an example of use:
@@ -181,14 +177,10 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
181177
* @brief Helper macro to declare a descriptor for an array of primitives
182178
*
183179
* @param struct_ Struct packing the values
184-
*
185180
* @param field_name_ Field name in the struct
186-
*
187181
* @param max_len_ Maximum number of elements in array
188-
*
189182
* @param len_field_ Field name in the struct for the number of elements
190183
* in the array
191-
*
192184
* @param elem_type_ Element type, must be a primitive type
193185
*
194186
* Here's an example of use:
@@ -230,16 +222,11 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
230222
* @brief Helper macro to declare a descriptor for an array of objects
231223
*
232224
* @param struct_ Struct packing the values
233-
*
234225
* @param field_name_ Field name in the struct containing the array
235-
*
236226
* @param max_len_ Maximum number of elements in the array
237-
*
238227
* @param len_field_ Field name in the struct for the number of elements
239228
* in the array
240-
*
241229
* @param elem_descr_ Element descriptor, pointer to a descriptor array
242-
*
243230
* @param elem_descr_len_ Number of elements in elem_descr_
244231
*
245232
* Here's an example of use:
@@ -299,16 +286,11 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
299286
* @brief Helper macro to declare a descriptor for an array of array
300287
*
301288
* @param struct_ Struct packing the values
302-
*
303289
* @param field_name_ Field name in the struct containing the array
304-
*
305290
* @param max_len_ Maximum number of elements in the array
306-
*
307291
* @param len_field_ Field name in the struct for the number of elements
308292
* in the array
309-
*
310293
* @param elem_descr_ Element descriptor, pointer to a descriptor array
311-
*
312294
* @param elem_descr_len_ Number of elements in elem_descr_
313295
*
314296
* Here's an example of use:
@@ -383,11 +365,8 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
383365
* This is useful when the JSON field is not a valid C identifier.
384366
*
385367
* @param struct_ Struct packing the values.
386-
*
387368
* @param json_field_name_ String, field name in JSON strings
388-
*
389369
* @param struct_field_name_ Field name in the struct
390-
*
391370
* @param type_ Token type for JSON value corresponding to a primitive
392371
* type.
393372
*
@@ -410,11 +389,8 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
410389
* This is useful when the JSON field is not a valid C identifier.
411390
*
412391
* @param struct_ Struct packing the values
413-
*
414392
* @param json_field_name_ String, field name in JSON strings
415-
*
416393
* @param struct_field_name_ Field name in the struct
417-
*
418394
* @param sub_descr_ Array of json_obj_descr describing the subobject
419395
*
420396
* @see JSON_OBJ_DESCR_OBJECT
@@ -442,16 +418,11 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
442418
* This is useful when the JSON field is not a valid C identifier.
443419
*
444420
* @param struct_ Struct packing the values
445-
*
446421
* @param json_field_name_ String, field name in JSON strings
447-
*
448422
* @param struct_field_name_ Field name in the struct
449-
*
450423
* @param max_len_ Maximum number of elements in array
451-
*
452424
* @param len_field_ Field name in the struct for the number of elements
453425
* in the array
454-
*
455426
* @param elem_type_ Element type, must be a primitive type
456427
*
457428
* @see JSON_OBJ_DESCR_ARRAY
@@ -486,18 +457,12 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
486457
* This is useful when the JSON field is not a valid C identifier.
487458
*
488459
* @param struct_ Struct packing the values
489-
*
490460
* @param json_field_name_ String, field name of the array in JSON strings
491-
*
492461
* @param struct_field_name_ Field name in the struct containing the array
493-
*
494462
* @param max_len_ Maximum number of elements in the array
495-
*
496463
* @param len_field_ Field name in the struct for the number of elements
497464
* in the array
498-
*
499465
* @param elem_descr_ Element descriptor, pointer to a descriptor array
500-
*
501466
* @param elem_descr_len_ Number of elements in elem_descr_
502467
*
503468
* Here's an example of use:
@@ -577,15 +542,11 @@ typedef int (*json_append_bytes_t)(const char *bytes, size_t len,
577542
* (3) only integer numbers are supported (no strtod() in the minimal libc).
578543
*
579544
* @param json Pointer to JSON-encoded value to be parsed
580-
*
581545
* @param len Length of JSON-encoded value
582-
*
583546
* @param descr Pointer to the descriptor array
584-
*
585547
* @param descr_len Number of elements in the descriptor array. Must be less
586548
* than 31 due to implementation detail reasons (if more fields are
587549
* necessary, use two descriptors)
588-
*
589550
* @param val Pointer to the struct to hold the decoded values
590551
*
591552
* @return < 0 if error, bitmap of decoded fields on success (bit 0
@@ -600,10 +561,8 @@ int json_obj_parse(char *json, size_t len,
600561
*
601562
* @param str The string to escape; the escape string is stored the
602563
* buffer pointed to by this parameter
603-
*
604564
* @param len Points to a size_t containing the size before and after
605565
* the escaping process
606-
*
607566
* @param buf_size The size of buffer str points to
608567
*
609568
* @return 0 if string has been escaped properly, or -ENOMEM if there
@@ -615,7 +574,6 @@ ssize_t json_escape(char *str, size_t *len, size_t buf_size);
615574
* @brief Calculates the JSON-escaped string length
616575
*
617576
* @param str The string to analyze
618-
*
619577
* @param len String size
620578
*
621579
* @return The length str would have if it were escaped
@@ -626,9 +584,7 @@ size_t json_calc_escaped_len(const char *str, size_t len);
626584
* @brief Calculates the string length to fully encode an object
627585
*
628586
* @param descr Pointer to the descriptor array
629-
*
630587
* @param descr_len Number of elements in the descriptor array
631-
*
632588
* @param val Struct holding the values
633589
*
634590
* @return Number of bytes necessary to encode the values if >0,
@@ -641,13 +597,9 @@ ssize_t json_calc_encoded_len(const struct json_obj_descr *descr,
641597
* @brief Encodes an object in a contiguous memory location
642598
*
643599
* @param descr Pointer to the descriptor array
644-
*
645600
* @param descr_len Number of elements in the descriptor array
646-
*
647601
* @param val Struct holding the values
648-
*
649602
* @param buffer Buffer to store the JSON data
650-
*
651603
* @param buf_size Size of buffer, in bytes, with space for the terminating
652604
* NUL character
653605
*
@@ -661,11 +613,8 @@ int json_obj_encode_buf(const struct json_obj_descr *descr, size_t descr_len,
661613
* @brief Encodes an array in a contiguous memory location
662614
*
663615
* @param descr Pointer to the descriptor array
664-
*
665616
* @param val Struct holding the values
666-
*
667617
* @param buffer Buffer to store the JSON data
668-
*
669618
* @param buf_size Size of buffer, in bytes, with space for the terminating
670619
* NUL character
671620
*
@@ -679,13 +628,9 @@ int json_arr_encode_buf(const struct json_obj_descr *descr, const void *val,
679628
* @brief Encodes an object using an arbitrary writer function
680629
*
681630
* @param descr Pointer to the descriptor array
682-
*
683631
* @param descr_len Number of elements in the descriptor array
684-
*
685632
* @param val Struct holding the values
686-
*
687633
* @param append_bytes Function to append bytes to the output
688-
*
689634
* @param data Data pointer to be passed to the append_bytes callback
690635
* function.
691636
*
@@ -700,11 +645,8 @@ int json_obj_encode(const struct json_obj_descr *descr, size_t descr_len,
700645
* @brief Encodes an array using an arbitrary writer function
701646
*
702647
* @param descr Pointer to the descriptor array
703-
*
704648
* @param val Struct holding the values
705-
*
706649
* @param append_bytes Function to append bytes to the output
707-
*
708650
* @param data Data pointer to be passed to the append_bytes callback
709651
* function.
710652
*

0 commit comments

Comments
 (0)