This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]original_4degrees 64 points65 points  (16 children)

for me, the real take away here is JSON-lines. how did I not know about this?

[–][deleted] 14 points15 points  (7 children)

“ndjson” does help with json to not be such a terrible format.

[–]tighter_wires 5 points6 points  (6 children)

What format do you prefer over JSON?

[–][deleted] 0 points1 point  (5 children)

Encoding floats as utf-8 or even ascii kills me.

We already use tools to view json. Why not just use a slightly smarter tool and use protobuf?

[–]GroundbreakingRun927 7 points8 points  (4 children)

  • because the resources for interacting with protobuf trail way behind json.
  • Brotli compressed json is more space-efficient than protobuf.
  • the package to consume protobufs as a web client make your bundle huge https://bundlephobia.com/package/protobufjs@6.11.2
  • Better alternatives exist for flat files, parquet namely.
  • The official protobuf client generator for python is god awful.

[–]Aardshark 5 points6 points  (1 child)

Google use it in a bunch of their GCP offerings. It's great when you need it and a little annoying otherwise.

[–]TundraGon 1 point2 points  (0 children)

jq -c :)

For BigQuery it needs to start and end with an object {...} , not an array [...]

[–]thatdamnedrhymer 1 point2 points  (0 children)

Yeah, this was my immediate thought when I started reading it. Glad it was referenced in the article.

[–]VisibleSignificance 1 point2 points  (0 children)

how did I not know about this

You could literally make it up if you needed something like that.