| ▲ | barishnamazov 5 hours ago | |||||||
You shouldn't be using JSON for things that'd have performance implications. | ||||||||
| ▲ | creationix 4 hours ago | parent | next [-] | |||||||
As with most things in engineering, it depends. There are real logistical costs to using binary formats. This format is almost compact as a binary format while still retaining all the nice qualities of being an ASCII friendly encoding (you can embed it anywhere strings are allowed, including copy-paste workflows) Think of it as a hybrid between JSON, SQLite, and generic compression. This format really excels for use cases where large read-only build artifacts are queried by worker nodes like an embedded database. | ||||||||
| ▲ | squirrellous 3 hours ago | parent | prev | next [-] | |||||||
I agree in principle. However JSON tooling has also got so good that other formats, when not optimized and held correctly, can be worse than JSON. For example IME stock protocol buffers can be worse than a well optimized JSON library (as much as it pains me to say this). | ||||||||
| ||||||||
| ▲ | Spivak 5 hours ago | parent | prev [-] | |||||||
Can you imagine if a service as chatty and performance sensitive as Discord used JSON for their entire API surface? | ||||||||