| 112 | } |
| 113 | |
| 114 | static void object_common(struct json_writer *jw, const char *key) |
| 115 | { |
| 116 | assert_in_object(jw, key); |
| 117 | maybe_add_comma(jw); |
| 118 | |
| 119 | if (jw->pretty) { |
| 120 | strbuf_addch(&jw->json, '\n'); |
| 121 | indent_pretty(jw); |
| 122 | } |
| 123 | |
| 124 | append_quoted_string(&jw->json, key); |
| 125 | strbuf_addch(&jw->json, ':'); |
| 126 | if (jw->pretty) |
| 127 | strbuf_addch(&jw->json, ' '); |
| 128 | } |
| 129 | |
| 130 | static void array_common(struct json_writer *jw) |
| 131 | { |
no test coverage detected