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

Re: [PATCH v3] routines to generate JSON data

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 23, 2018, 16:41 UTC
Message-ID
<20180323164026.GC179915@aiede.svl.corp.google.com>
In-Reply-To
<20180323162952.81443-1-git@jeffhostetler.com>
Hi,
git@jeffhostetler.com wrote:
Show 6 quoted lines
> From: Jeff Hostetler <jeffhost@microsoft.com>
>
> This is version 3 of my JSON data format routines.
>
> This version addresses the variable name changes in [v2] and adds additional
> test cases.  I also changed the BUG() calls to die() to help with testing.
Can the information below go in the commit message?

Usually to avoid that kind of problem, I don't send a cover letter in one-patch series. Information that I don't want to make part of permanent history (like the above) can go after the three-dash line to ensure it doesn't go in the commit message.

Thanks, Jonathan

Show 18 quoted lines
> The json-writer routines can be used generate structured data in a JSON-like
> format.  I say "JSON-like" because we don't enforce the Unicode/UTF-8
> requirement [3,4] on string values.  This was discussed on the mailing list
> in the [v1] and [v2] threads, but to summarize here: Git doesn't know if
> various fields, such as Unix pathnames and author names, are Unicode or just
> 8-bit character data, so Git would not know how to properly encode such
> fields and the consumer of such output would not know these strings were
> encoded (once or twice).  So, until we have a pressing need to generate
> proper Unicode data, we avoid it for now.
>
> The initial use for the json-writer routines is for generating telemetry data
> for executed Git commands.  Later, we might want to use them in other commands
> such as status.
>
> [v1] https://public-inbox.org/git/20180316194057.77513-1-git@jeffhostetler.com/
> [v2] https://public-inbox.org/git/20180321192827.44330-1-git@jeffhostetler.com/
> [3]  http://www.ietf.org/rfc/rfc7159.txt
> [4]  http://json.org/
Previous: Jeff HostetlerNext: Ramsay Jones
Message 5 of 7 in “routines to generate JSON data”
  1. routines to generate JSON datagit@jeffhostetler.com, Mar 23, 2018
  2. json_writer: new routines to create data in JSON formatgit@jeffhostetler.com, Mar 23, 2018
  3. Jonathan NiederMar 23, 2018
  4. Jeff HostetlerMar 23, 2018
  5. Jonathan NiederMar 23, 2018
  6. Ramsay JonesMar 23, 2018
  7. Jeff HostetlerMar 23, 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.