{"thread":{"id":"48173","subject":"[PATCH v6] json-writer: fixups for V5","startedAt":"2018-03-28T13:09:57Z","lastAt":"2018-03-28T13:09:57Z","messageCount":1,"participants":["git@jeffhostetler.com"],"isPatch":true,"patchVersion":6,"patchTotal":null},"messages":[{"id":"343222","messageId":"20180328130940.44223-1-git@jeffhostetler.com","threadId":"48173","inReplyTo":null,"subject":"[PATCH v6] json-writer: fixups for V5","fromName":"","fromEmail":"git@jeffhostetler.com","sentAt":"2018-03-28T13:09:40Z","receivedAt":"2018-03-28T13:09:57Z","isPatch":true,"sender":{"key":"git@jeffhostetler.com","avatar":null},"body":"From: Jeff Hostetler <jeffhost@microsoft.com>\n\nPlease squash this onto the top of jh/json-writer.\n\nFix leading whitespace in t0019 using tricked suggested by Junio.\nFix unnecessary cast for intmax_t suggested by Wink.\n\nSigned-off-by: Jeff Hostetler <jeffhost@microsoft.com>\n---\n json-writer.c          |  4 ++--\n t/t0019-json-writer.sh | 36 ++++++++++++++++++------------------\n 2 files changed, 20 insertions(+), 20 deletions(-)\n\ndiff --git a/json-writer.c b/json-writer.c\nindex 1b49158..dbfcf70 100644\n--- a/json-writer.c\n+++ b/json-writer.c\n@@ -165,7 +165,7 @@ void jw_object_string(struct json_writer *jw, const char *key, const char *value\n void jw_object_intmax(struct json_writer *jw, const char *key, intmax_t value)\n {\n \tobject_common(jw, key);\n-\tstrbuf_addf(&jw->json, \"%\"PRIdMAX, (intmax_t)value);\n+\tstrbuf_addf(&jw->json, \"%\"PRIdMAX, value);\n }\n \n void jw_object_double(struct json_writer *jw, const char *key, int precision,\n@@ -303,7 +303,7 @@ void jw_array_string(struct json_writer *jw, const char *value)\n void jw_array_intmax(struct json_writer *jw, intmax_t value)\n {\n \tarray_common(jw);\n-\tstrbuf_addf(&jw->json, \"%\"PRIdMAX, (intmax_t)value);\n+\tstrbuf_addf(&jw->json, \"%\"PRIdMAX, value);\n }\n \n void jw_array_double(struct json_writer *jw, int precision, double value)\ndiff --git a/t/t0019-json-writer.sh b/t/t0019-json-writer.sh\nindex a04c055..bd6d474 100755\n--- a/t/t0019-json-writer.sh\n+++ b/t/t0019-json-writer.sh\n@@ -166,24 +166,24 @@ test_expect_success 'nested inline object and array 2' '\n '\n \n test_expect_success 'pretty nested inline object and array 2' '\n-\tcat >expect <<EOF &&\n-{\n-  \"a\": \"abc\",\n-  \"b\": 42,\n-  \"sub1\": {\n-    \"c\": 3.14,\n-    \"d\": true,\n-    \"sub2\": [\n-      false,\n-      {\n-        \"g\": 0,\n-        \"h\": 1\n-      },\n-      null\n-    ]\n-  }\n-}\n-EOF\n+\tsed -e \"s/^|//\" >expect <<-\\EOF &&\n+\t|{\n+\t|  \"a\": \"abc\",\n+\t|  \"b\": 42,\n+\t|  \"sub1\": {\n+\t|    \"c\": 3.14,\n+\t|    \"d\": true,\n+\t|    \"sub2\": [\n+\t|      false,\n+\t|      {\n+\t|        \"g\": 0,\n+\t|        \"h\": 1\n+\t|      },\n+\t|      null\n+\t|    ]\n+\t|  }\n+\t|}\n+\tEOF\n \ttest-json-writer >actual \\\n \t\t--pretty \\\n \t\t@object \\\n-- \n2.9.3\n\n"}]}