Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It doesn't really miss the point - the point was a more human friendly JSON and it hit that nail on the head pretty well if you ask me.


"a more human friendly JSON" is a goal that misses the point of JSON.


Yes, exactly. But it's not even meant to replace JSON. It's not for exchanging data between computers, and its not for webservices etc.

Its for when you need a quick config file, and you think "Gosh, I wish I could just put some sloppy JSON/Python-like code in here, with a few comments.", and you don't want to use XML, INI, or YAML, or roll your own format.

I guess most people here are in the web development business. Which is fine, but I am not currently. I don't need JSON for what JSON is made for, but I often need something almost like JSON for my use cases.


Just use JSON, and add a key (which you can ignore!) for comments. Even better, you get to use any of the dozens of already-tested JSON parsers out there for this! There is absolutely no reason you need to reinvent the wheel here.

You know what's annoying? Having to remember a dozen-odd JSON-but-not-really config file syntaxes instead of just JSON.


> You know what's annoying? Having to remember a dozen-odd JSON-but-not-really config file syntaxes instead of just JSON.

That's why YAML is out of the question for me. But JSON is too restricted to write it manually (no trailing commas, no comments, no round-trip-safety). What I'd ideally like is to take this Python/JS5 file (differ only in the comment indicator # vs //)

    # this is an important comment
    obj = {'hello': 'world',
           'list': [1,2,3,4,5,]}
    ...
    from configfile import obj
and to turn it into a safe

    // this is an important comment
    {'hello': 'world',
           'list': [1,2,3,4,5,]}
    ...
    obj = parser.loads("configfile.cfg")
It's not that I don't like JSON. Its just that I have a different requirements. When I need JSON, I use JSON. When I need easily editable config files that look like Python or JS (which I can easily remember), I use something like HJSON.


Two of your issues go away:

  {
    "configOption": { 
                      "c": "This option is configurable.",
                      "val": 42
                    }
  }
And now, the comment is round-trip-safe and exists!


It's not a "human friendly JSON".

It's a human friendly (to some. It's ambiguous, so I don't think it's very friendly) , but it's not JSON and doesn't offer any of the advantages of JSON.


what part of the spec do you consider ambiguous?


Quotes can sometimes be omitted, sometimes not. Lack of types leaves data up to interpretation. Etc...


BCD is a human-friendly numeric format that makes a similar level of sense in today's world.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: