git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v5] routines to generate JSON data

From
Ggit@jeffhostetler.com <git@jeffhostetler.com>
Date
Mar 27, 2018, 21:02 UTC
Message-ID
<20180327210233.29076-1-git@jeffhostetler.com>
From: Jeff Hostetler <jeffhost@microsoft.com>
This is version 5 of my JSON data format routines.

This version address the uint64_t vs intmax_t formatting issues that were discussed on the mailing list. I removed the jw_*_int() and jw_*_uint64() routines and replaced them with a single jw_*_intmax() routine.

Also added a jw_release() routine similar to strbuf_release() and fixed the indentation of sub-array when pretty printing is enabled.

The following PR includes my WIP telemetry changes that build upon the json-writer routines and demonstrates how they might be used. The first commit in this PR is this patch.

     https://github.com/jeffhostetler/git/pull/11
Jeff Hostetler (1):
  json_writer: new routines to create data in JSON format
 Makefile                    |   2 +
 json-writer.c               | 394 ++++++++++++++++++++++++++++++
 json-writer.h               |  91 +++++++
 t/helper/test-json-writer.c | 572 ++++++++++++++++++++++++++++++++++++++++++++
 t/t0019-json-writer.sh      | 253 ++++++++++++++++++++
 5 files changed, 1312 insertions(+)
 create mode 100644 json-writer.c
 create mode 100644 json-writer.h
 create mode 100644 t/helper/test-json-writer.c
 create mode 100755 t/t0019-json-writer.sh
-- 
2.9.3
Next: git@jeffhostetler.com
Message 1 of 3 in “routines to generate JSON data”
  1. routines to generate JSON datagit@jeffhostetler.com, Mar 27, 2018
  2. json_writer: new routines to create data in JSON formatgit@jeffhostetler.com, Mar 27, 2018
  3. Wink SavilleMar 27, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.