From ae044d29cd7da1b96298b7c1682b54894e033990 Mon Sep 17 00:00:00 2001 From: Cole Mickens Date: Sun, 24 Jan 2016 16:15:19 -0800 Subject: [PATCH] unescape forward slashes in non-pretty mode --- swaymsg/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/swaymsg/main.c b/swaymsg/main.c index 42b256b2..46a3edd5 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c @@ -144,7 +144,6 @@ int main(int argc, char **argv) { struct json_object *obj = json_tokener_parse(pb->buf); const char *resp_json = json_object_to_json_string_ext(obj, JSON_C_TO_STRING_PRETTY); - // Temporary workaround until json-c has a new release // at which point json_object_to_json_string_ext has a flag that // prevents the need for the following line. @@ -154,6 +153,10 @@ int main(int argc, char **argv) { free((char*)resp_json); printbuf_free(pb); } else if (!quiet) { + // Temporary workaround until json-c has a new release + // at which point json_object_to_json_string_ext has a flag that + // prevents the need for the following line. + scrub_escaped_forward_slash(resp); printf("%s\n", resp); } close(socketfd);