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

Re: [PATCH 0/2] routines to generate JSON data

From
Jacob Keller <jacob.keller@gmail.com>
Date
Mar 17, 2018, 07:38 UTC
Message-ID
<CA+P7+xpGWZaFMWhN72beUVaV_HuECAAEYhf+UT-CPZUV+Gew4Q@mail.gmail.com>
In-Reply-To
<20180316211837.GB12333@sigill.intra.peff.net>
On Fri, Mar 16, 2018 at 2:18 PM, Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
>   3. Some other similar format. YAML comes to mind. Last time I looked
>      (quite a while ago), it seemed insanely complex, but I think you
>      could implement only a reasonable subset. OTOH, I think the tools
>      ecosystem for parsing JSON (e.g., jq) is much better.
>

I would personally avoid YAML. It's "easier" for humans to read/parse, but honestly JSON is already simple enough and anyone who writes C or javascript can likely parse and hand-write JSON anyways. YAML lacks built-in parsers for most languages, where as many scripting languages already have JSON parsing built in, or have more easily attainable libraries available. In contrast, the YAML libraries are much more complex and less likely to be available.

That's just my own experience at $dayjob though.

Thanks, Jake

Previous: Jeff KingNext: Jeff Hostetler
Message 7 of 11 in “routines to generate JSON data”
  1. 0/2 routines to generate JSON datagit@jeffhostetler.com, Mar 16, 2018
  2. 2/2 json-writer: unit testgit@jeffhostetler.com, Mar 16, 2018
  3. 1/2 json_writer: new routines to create data in JSON formatgit@jeffhostetler.com, Mar 16, 2018
  4. Jeff KingMar 16, 2018
  5. Ævar Arnfjörð BjarmasonMar 16, 2018
  6. Jeff KingMar 20, 2018
  7. Jacob KellerMar 17, 2018
  8. Jeff HostetlerMar 19, 2018
  9. Jeff HostetlerMar 19, 2018
  10. Jeff KingMar 20, 2018
  11. Jeff HostetlerMar 20, 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.