Compact JSON in .zarray
See original GitHub issueJSON 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:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Good points. Perhaps we could have an option for this. Similar to xarray’s option machinery. Like
zarr.set_options(compact_json=True)
.