1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
ZyXEL_PMG5617GA/package/libs/libjson-c/patches-0.12/010-readable_json_file.patch
2022-11-27 10:16:14 +00:00

27 lines
1.1 KiB
Diff

Index: json-c-0.12/json_object.c
===================================================================
--- json-c-0.12.orig/json_object.c 2016-01-05 14:12:12.868846806 +0800
+++ json-c-0.12/json_object.c 2016-01-05 14:13:19.041220540 +0800
@@ -283,7 +283,7 @@
const char* json_object_to_json_string(struct json_object *jso)
{
- return json_object_to_json_string_ext(jso, JSON_C_TO_STRING_SPACED);
+ return json_object_to_json_string_ext(jso, JSON_C_TO_STRING_SPACED | JSON_C_TO_STRING_PRETTY);
}
static void indent(struct printbuf *pb, int level, int flags)
Index: json-c-0.12/json_util.c
===================================================================
--- json-c-0.12.orig/json_util.c 2016-01-05 14:12:12.868846806 +0800
+++ json-c-0.12/json_util.c 2016-01-05 14:25:43.149088029 +0800
@@ -144,7 +144,7 @@
int json_object_to_file(const char *filename, struct json_object *obj)
{
- return json_object_to_file_ext(filename, obj, JSON_C_TO_STRING_PLAIN);
+ return json_object_to_file_ext(filename, obj, JSON_C_TO_STRING_PLAIN | JSON_C_TO_STRING_PRETTY);
}
int json_parse_double(const char *buf, double *retval)