For some reason, I need to pass some large numerical vectors through a json.
A trivial serialization leads to the following plain text:
[[0, 0.0003963873381352339], [1, 0.0008297143834970196], [2, 0.0007295088369519877],
[3, 0.0007836414989179601], [4, 0.0007501355526877312], ...
This is quite inefficient as we are using 15 bytes to store 4 byte floating points. What could be a more efficient way to encode numbers in a json file? Efficient as in size of the generate files; parsing time/resources is somewhat less important.
Later consumers of such json are python and javascript scripts, with common open source libraries available for parser.