3 ms·
> Why not throw in the inline comments feature to the mix if you're gonna end up using a different spec/different parser anyway? Doing so would complicate adop
by laurencerowe 5y ago
> Why not throw in the inline comments feature to the mix if you're gonna end up using a different spec/different parser anyway?
Doing so would complicate adoption, since parsing is essentially just:
for line in file:
obj = json.loads(line)
> This is an 8+ year old spec and I don't think it has caught much adoption
It's seen huge adoption, essentially becoming the standard logging format for many Node JS applications.
Usually I've heard it referred to as JSON Lines: https://jsonlines.org https://jsonlines.org
- nerdponx 5y agoThe name "JSON Lines" is a lot better in my opinion. I hope the two Git repo maintainers can agree on some kind of merge, but they've had almost a decade to do it and neither one seems interested. There's also an RFC (7464) for more or less the same thing, except using ASCII record separators instead of newline characters: https://datatracker.ietf.org/doc/html/rfc7464 https://datatracker.ietf.org/doc/html/rfc7464 And yes, I have used this at $JOB and I intend to use it in future ${JOB}s. That's adoption.
- laurencerowe 5y agoBig advantage of using new lines over record separators is that you can use standard unix command line tools. Can get a long way with grep | jq | sort | uniq pipelines.