From: Daniel Wagner Date: Thu, 17 Mar 2022 14:32:26 +0000 (+0100) Subject: nvme: Do not slash escape strings in JSON output X-Git-Tag: v2.0-rc7~7^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fc5fa2451482361257a77f564f744a957801907d;p=users%2Fsagi%2Fnvme-cli.git nvme: Do not slash escape strings in JSON output nvme-cli 1.x didn't do any (optional) slash escaping in JSON output. Don't break backwards compatibility unnecessary. Signed-off-by: Daniel Wagner --- diff --git a/nvme.h b/nvme.h index 66ab46a3..6dc6ad1c 100644 --- a/nvme.h +++ b/nvme.h @@ -57,7 +57,9 @@ #define json_array_add_value_string(o, v) \ json_object_array_add(o, json_object_new_string(v)) #define json_print_object(o, u) \ - printf("%s", json_object_to_json_string_ext(o, JSON_C_TO_STRING_PRETTY)) + printf("%s", json_object_to_json_string_ext(o, \ + JSON_C_TO_STRING_PRETTY | \ + JSON_C_TO_STRING_NOSLASHESCAPE)) #else #include "util/json.h" #endif