<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/json-writer.c, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-07-16T20:55:39Z</updated>
<entry>
<title>json_writer: new routines to create JSON data</title>
<updated>2018-07-16T20:55:39Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2018-07-13T16:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75459410edd8d3bf38a2f1ad785f54b97770b324'/>
<id>urn:sha1:75459410edd8d3bf38a2f1ad785f54b97770b324</id>
<content type='text'>
Add "struct json_writer" and a series of jw_ routines to compose JSON
data into a string buffer.  The resulting string may then be printed by
commands wanting to support a JSON-like output format.

The json_writer is limited to correctly formatting structured data for
output.  It does not attempt to build an object model of the JSON data.

We say "JSON-like" because we do not enforce the Unicode (usually UTF-8)
requirement on string fields.  Internally, Git does not necessarily have
Unicode/UTF-8 data for most fields, so it is currently unclear the best
way to enforce that requirement.  For example, on Linux pathnames can
contain arbitrary 8-bit character data, so a command like "status" would
not know how to encode the reported pathnames.  We may want to revisit
this (or double encode such strings) in the future.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Helped-by: René Scharfe &lt;l.s.r@web.de&gt;
Helped-by: Wink Saville &lt;wink@saville.com&gt;
Helped-by: Ramsay Jones &lt;ramsay@ramsayjones.plus.com&gt;
Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
