Comment

Comment by simonw

"gojq does not keep the order of object keys" is a bit disappointing.

I care about key order purely for cosmetic reasons: when I'm designing JSON APIs I like to put things like the "id" key first in an object layout, and when I'm manipulating JSON using jq or similar I like to maintain those aesthetic choices.

I know it's bad to write code that depends on key order, but it's important to me as a way of keeping JSON as human-readable as possible.

After all, human readability is one of the big benefits of JSON over various other binary formats.

parent simonw 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton