ipc: remove forward slash escaping in JSON output

This commit is contained in:
stormshadow 2026-04-17 17:39:47 +05:30 committed by Anirvan Banerjee
parent c675da04aa
commit fa8d198082

View file

@ -187,8 +187,9 @@ print_json(const char *data, bool pretty)
return; return;
} }
int flags = pretty ? (JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED) int flags = JSON_C_TO_STRING_NOSLASHESCAPE
: JSON_C_TO_STRING_PLAIN; | (pretty ? (JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED)
: JSON_C_TO_STRING_PLAIN);
printf("%s\n", json_object_to_json_string_ext(obj, flags)); printf("%s\n", json_object_to_json_string_ext(obj, flags));
json_object_put(obj); json_object_put(obj);