From: Klas Lindfors Date: Fri, 19 Apr 2013 09:28:34 +0000 (+0200) Subject: use json_object_to_json_string_ext to get pretty printed json X-Git-Tag: v1.13.0~24^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e61e485c4a221d0b71b9d779cd5170c2a0649134;p=yubikey-personalization use json_object_to_json_string_ext to get pretty printed json --- 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);