Hacker News new | ask | show | jobs
by Jare 556 days ago
What example(s) of file format would you say are designed for humans to edit and still represent the kind of structured contents that json does?
4 comments

TOML, extensions of json like json5 and hjson, a bunch of lesser known formats for nested structures like NestedText, UCL, kdl, Eno,sdlang, eldf, etc.

Also languages with some progrommatic capabilities like cue, dhall, jsonnet, nickel etc.

Non of them are perfect, and some are less suitable for certain use cases than others. But IMO pretty much all of them are better for human editing than json, and in many cases yaml.

Any format that:

- doesn't require to quote everything

- has lists/dictionaries

- uses indentation and new lines instead of commas and brackets

- doesn't have 1000 unnecessary features like YAML

Also, you don't need all types from JSON.

> you don't need all types from JSON

JSON has a very minimal set of types and I regularly use all of them. I guess you could argue that integers and numbers could be combined, but I think that's it.

I can’t think of anything that is not painful in some way.
JSON with trailing comma support.