]> err.no Git - yubikey-personalization/commitdiff
use json_object_to_json_string_ext to get pretty printed json
authorKlas Lindfors <klas@yubico.com>
Fri, 19 Apr 2013 09:28:34 +0000 (11:28 +0200)
committerKlas Lindfors <klas@yubico.com>
Fri, 19 Apr 2013 09:28:34 +0000 (11:28 +0200)
ykpers-json.c

index dfca414cabd79a0ce7d833e549047a283a0e2f27..905bbaf97a623ee13ba7ab6b440b43b9b9bd96fd 100644 (file)
@@ -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);