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

Re: [PATCH v2] routines to generate JSON data

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 22, 2018, 08:38 UTC
Message-ID
<87sh8sy06t.fsf@evledraar.gmail.com>
In-Reply-To
<20180321192827.44330-1-git@jeffhostetler.com>
On Wed, Mar 21 2018, git@jeffhostetler.com wrote:
Show 16 quoted lines
> So, I'm not sure we have a route to get UTF-8-clean data out of Git, and if
> we do it is beyond the scope of this patch series.
>
> So I think for our uses here, defining this as "JSON-like" is probably the
> best answer.  We write the strings as we received them (from the file system,
> the index, or whatever).  These strings are properly escaped WRT double
> quotes, backslashes, and control characters, so we shouldn't have an issue
> with decoders getting out of sync -- only with them rejecting non-UTF-8
> sequences.
>
> We could blindly \uXXXX encode each of the hi-bit characters, if that would
> help the parsers, but I don't want to do that right now.
>
> WRT binary data, I had not intended using this for binary data.  And without
> knowing what kinds or quantity of binary data we might use it for, I'd like
> to ignore this for now.

I agree we should just ignore this problem for now given the immediate use-case.

Previous: Jeff King
Message 10 of 10 in “routines to generate JSON data”
  1. routines to generate JSON datagit@jeffhostetler.com, Mar 21, 2018
  2. json_writer: new routines to create data in JSON formatgit@jeffhostetler.com, Mar 21, 2018
  3. Junio C HamanoMar 21, 2018
  4. Jeff HostetlerMar 23, 2018
  5. René ScharfeMar 23, 2018
  6. Jeff HostetlerMar 23, 2018
  7. René ScharfeMar 23, 2018
  8. Jeff HostetlerMar 23, 2018
  9. Jeff KingMar 22, 2018
  10. Ævar Arnfjörð BjarmasonMar 22, 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.