Live data from Hacker News

Ignore the haters, and other lessons learned from creating JSON5

aseemk.substack.com

111–120 of 211 posts

Re: Ignore the haters, and other lessons learned from creating JSON5

#111
post #15

I enjoy using json5. I solves a real problem imo.. Regarding the criticism, I get the same bad energy when people get a kick out of fixing someone’s grammar, and then do not even comprehend what is being complicated. Well done on the lib and thanks for building something useful! Good writeup also! Think I’m going to give the commit access trick a shot.

> I enjoy using json5. I solves a real problem imo..

And what problem would that be?

Re: Ignore the haters, and other lessons learned from creating JSON5

#112

Honestly I don't understand why JSON should be human-readable. It is a data serialization format intended to be read by software. Just adding comments and multi-line strings doesn't make it human-readable, it is still too bloated and I don't like writing it manually. If you want a human-readable format, try at least to remove unnecessary quotes, brackets and commas and make it look similar to YAML. JSON is not intend…

> JSON is not intended to be used in configs and other user-editable files. Yes, but it’s a bit late for that. It sounds like you’re advocating for a configuration format somewhere in the space between JSON and YAML. Not JSON, because it’s annoying to write by hand, no comments, no trailing commas. Not YAML, because of all those unintuitive edge cases like “no” (unquoted) being a Boolean. It sounds like the primary d…

> Yes, but it’s a bit late for that.

That just shows poor judgement on behalf of the developer who made that decision, not a failing of the language.

Re: Ignore the haters, and other lessons learned from creating JSON5

#113
post #30

Earlier quoted context omitted.

I wouldn't want to work for some company whose founder can be openly toxic against a project that solves an actual problem.

How many years ago was this? I’m sure Mitchell has grown a lot and matured since then. Just like everybody else. He did something a little mean spirited. Maybe even something he regrets now. I think he deserves a little bit of grace.

An apology is powerful leadership. The resolution I've seen, slinking away as if it never happened, is pure cowardice.

Re: Ignore the haters, and other lessons learned from creating JSON5

#114
post #8

I'm kind of appalled that the Hashicorp guy went that far to put someone down for just building something they found useful to themselves. What a great way to discourage someone from expressing themselves creatively. Glad Aseem carried on regardless.

I regret it! As Aseem said, I admitted fault and apologized for this. Here is an excerpt from an email I sent Aseem when he approached me about it (as he noted in his post).

> I’m sorry about it, I’m sure it was offensive in many ways. But while clear in hindsight, I certainly didn’t realize it at the time. Its not an excuse, but I was 21 years old at the time and my EQ was well… under-developed. I didn’t mean any harm, I was mostly having fun with it, and I’m happy to hear your project is doing well. Anyways, congrats on the success, sorry for the unkind gesture, I would never do such a thing anymore.

Aseem accepted my apology, and I'm very happy to see his project succeed the way it has! I obviously disregarded the project and he proved me (and many others) wrong!

Re: Ignore the haters, and other lessons learned from creating JSON5

#116
I don't think ignore the haters is sage advice in this context. What was directed at this project in the original HN thread was not hate, it was criticism. These are very different things. People were not abusing the author. Some of the original commenters had very salient critiques, and questions.

"Ignore the haters" reads like: "I ignored all criticism of my idea, and some other people like it anyway.".

There's already so many terrible technologies in the web programming domain that have plowed onwards in the face of so much criticism, and now we're stuck with them. Part of being a good programmer is being humble, and accepting that you might not have all the answers, the best ideas, or see the bigger picture.

Re: Ignore the haters, and other lessons learned from creating JSON5

#117

The only 2 things I'd like to add in JSON are trailing commas and comments, and this is already supported in most JSON configs (.eslintrc, .babelrc, ..), it's called JSONC I believe

A native set type would be nice too, and the syntax for it is obvious— comma separated values like a list, but enclosed in braces like a dict.

A set is just a list with a uniqueness constraint. JSON already has a list type.

Re: Ignore the haters, and other lessons learned from creating JSON5

#118
I think the only valid objection here is that calling it json5 implies that it is an offical new version of json by the same people who brought you json. That's misleading and bordering on unethical in my opinion.

Everything else is a matter of taste, and who really cares.

Re: Ignore the haters, and other lessons learned from creating JSON5

#119

Earlier quoted context omitted.

This seems like making a mountain out of a molehill. > Extending the syntax is undoing all the communal work JSON5 takes stuff from ES5.1 and adds it to JSON, and ES5 is backwards-compatible with older JS. This means it's fairly trivial to convert JSON5 to JSON (literally 13 lines: https://gist.github.com/iddan/3d34b12f6b22c30a8a07c149b3175e... ). And ES5.1 itself was the product of communal work. > encroaching on gr…

> This means it's fairly trivial to convert JSON5 to JSON (literally 13 lines: https://gist.github.com/iddan/3d34b12f6b22c30a8a07c149b3175e... ). Did you paste the correct link? This just plumbs together an existing JSON 5 parser with a JSON 4 serializer. How many lines does this take without importing a library the solves this for you?

JSON5 parse constructs a Javascript object, which can in turn be serialized by JSON 4 into valid plain JSON string. That's not an invalid way of converting the two objects.

JSON.stringify is part of the standard JS spec: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

JSON5.parse() is part of JSON5's API: https://json5.org/#json5parse

So any project that includes both standard JS and JSON5 could literally copy and paste this code. You're still importing JSON5, but you would presumably have to do that anyways to use JSON5.

Re: Ignore the haters, and other lessons learned from creating JSON5

#120
post #30

Earlier quoted context omitted.

I wouldn't want to work for some company whose founder can be openly toxic against a project that solves an actual problem.

How many years ago was this? I’m sure Mitchell has grown a lot and matured since then. Just like everybody else. He did something a little mean spirited. Maybe even something he regrets now. I think he deserves a little bit of grace.

I was 21 years old at the time. What I did was mean, I did apologize, I do regret it, and I don't think I would act this way anymore (to be fair to Aseem, he noted all this in his post). I went through various phases of my life where I was "a little mean spirited" and this is an example of it. Life lessons have changed me over time, but you can catch glimpses of it in moments like this.

More details in this comment: https://news.ycombinator.com/item?id=32380944

Post reply on HN