aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/json-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/json-core.c b/src/json-core.c
index 174f182e..4657b616 100644
--- a/src/json-core.c
+++ b/src/json-core.c
@@ -3136,7 +3136,8 @@ json_core_process_request (ctrl_t ctrl, const char *request)
err_obj = error_object (NULL, "Printing JSON data failed");
if (ctrl->interactive)
res = cJSON_Print (err_obj);
- res = cJSON_PrintUnformatted (err_obj);
+ else
+ res = cJSON_PrintUnformatted (err_obj);
cJSON_Delete (err_obj);
}