Thread (3 messages) 3 messages, 2 authors, 2018-03-27

Re: [PATCH v5] json_writer: new routines to create data in JSON format

flat view

From: Wink Saville <hidden>
Date: 2018-03-27 22:04:22

On Tue, Mar 27, 2018 at 2:02 PM [off-list ref] wrote:
From: Jeff Hostetler <redacted>

Add a series of jw_ routines and "struct json_writer" structure to compose
JSON data.  The resulting string data can then be output by commands wanting
to support a JSON output format.
<snip>
quoted hunk ↗ jump to hunk



 void jw_object_intmax(struct json_writer *jw, const char *key, intmax_t value)
+{
+       object_common(jw, key);
+       strbuf_addf(&jw->json, "%"PRIdMAX, (intmax_t)value);
Cast is not necessary.
+}
+
<snip>
quoted hunk ↗ jump to hunk

+void jw_array_intmax(struct json_writer *jw, intmax_t value)
+{
+       array_common(jw);
+       strbuf_addf(&jw->json, "%"PRIdMAX, (intmax_t)value);
Cast is not necessary
+}
+
<snip>

-- Wink
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help