From e61e485c4a221d0b71b9d779cd5170c2a0649134 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Fri, 19 Apr 2013 11:28:34 +0200 Subject: [PATCH] use json_object_to_json_string_ext to get pretty printed json --- ykpers-json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ykpers-json.c b/ykpers-json.c index dfca414..905bbaf 100644 --- a/ykpers-json.c +++ b/ykpers-json.c @@ -157,7 +157,7 @@ int _ykp_json_export_cfg(const YKP_CONFIG *cfg, char *json, size_t len) { } } - strncpy(json, json_object_to_json_string(jobj), len); + strncpy(json, json_object_to_json_string_ext(jobj, JSON_C_TO_STRING_PRETTY), len); /* free the root object, will free all children */ json_object_put(jobj); -- 2.39.5