diff options
Diffstat (limited to 'json-writer.h')
-rw-r--r-- | json-writer.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/json-writer.h b/json-writer.h index 83906b0..04413bd 100644 --- a/json-writer.h +++ b/json-writer.h @@ -3,8 +3,8 @@ /* * JSON data structures are defined at: - * [1] http://www.ietf.org/rfc/rfc7159.txt - * [2] http://json.org/ + * [1] https://www.ietf.org/rfc/rfc7159.txt + * [2] https://www.json.org/ * * The JSON-writer API allows one to build JSON data structures using a * simple wrapper around a "struct strbuf" buffer. It is intended as a @@ -64,7 +64,10 @@ struct json_writer unsigned int pretty:1; }; -#define JSON_WRITER_INIT { STRBUF_INIT, STRBUF_INIT, 0, 0 } +#define JSON_WRITER_INIT { \ + .json = STRBUF_INIT, \ + .open_stack = STRBUF_INIT, \ +} void jw_init(struct json_writer *jw); void jw_release(struct json_writer *jw); |