question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compact JSON in .zarray

See original GitHub issue

JSON output is deliberately made human-readable with much whitespace. That produces large .zarray files with string arrays and categorize. In one small example with about 150 different strings, the human-readable .zarray was 3837 bytes and the compact version was 1284 bytes. With a larger variety of strings, the difference would be larger.

As Zarr is a storage format that isn’t intended for human readability, I would like to propose to write JSON with indent=None, separators=(",", ":").

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
shoyercommented, Mar 5, 2021

I’ll take a contrarian perspective: I don’t mind the difference between storing/downloading/uploading a 3 KB and a 1 KB metadata file (or even 30 KB vs 10 KB), and I like readable human JSON. This is a tiny little bit of data compared to even a single array chunk.

0reactions
rabernatcommented, Mar 5, 2021

Good points. Perhaps we could have an option for this. Similar to xarray’s option machinery. Like zarr.set_options(compact_json=True).

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON arrays compact syntax - Stack Overflow
1. If you want compact json just gzip it. – user3942918 · 2. if you want to validate a format, use a resource...
Read more >
odata-compact-json-format-v4.0.pdf - OASIS Open
This compact JSON format defines an alternative representation for responses to the OData JSON Format, heavily taking advantage of arrays and the.
Read more >
FracturedJson Web Formatter
FracturedJson is a family of utilities that format JSON data in a way that's easy for humans to read, but fairly compact. Arrays...
Read more >
JSON Minifier - Code Beautify
Best Online JSON Minifier helps user to Minify, Compress json by removing spaces, lines and tabs.
Read more >
Reducing JSON Data Size - Baeldung
In this tutorial, we'll look at various ways of reducing the size of JSON in our Java applications.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found