mirror of
https://github.com/DaveGamble/cJSON
synced 2024-12-23 07:02:07 +00:00
refactor cJSONUtils_SortObject
This commit is contained in:
parent
7bf62ff4dc
commit
01d656bebc
@ -1140,7 +1140,7 @@ static cJSON *cJSONUtils_SortList(cJSON *list)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON *object)
|
CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON * const object)
|
||||||
{
|
{
|
||||||
object->child = cJSONUtils_SortList(object->child);
|
object->child = cJSONUtils_SortList(object->child);
|
||||||
}
|
}
|
||||||
|
@ -64,4 +64,4 @@ CJSON_PUBLIC(cJSON *) cJSONUtils_GenerateMergePatch(cJSON *from, cJSON *to);
|
|||||||
CJSON_PUBLIC(char *) cJSONUtils_FindPointerFromObjectTo(const cJSON * const object, const cJSON * const target);
|
CJSON_PUBLIC(char *) cJSONUtils_FindPointerFromObjectTo(const cJSON * const object, const cJSON * const target);
|
||||||
|
|
||||||
/* Sorts the members of the object into alphabetical order. */
|
/* Sorts the members of the object into alphabetical order. */
|
||||||
CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON *object);
|
CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON * const object);
|
||||||
|
Loading…
Reference in New Issue
Block a user