Binary coding for JSON?

In my Javascript application, quite a lot of data is downloaded from the server, and I thought that in addition to the normal gzip that the server runs, I can encode the data in binary format, and not in text JSON.
Is there a standard way to do this?
Ideally, this should be a small tool that can receive a JSON text file and convert it to a common binary format and a small Javascript library that decodes it.

Also, is there anything special that needs to be done in XHR to transmit binary data?

+3
source share
3 answers

gzip , , , javascript .

, gzip , , javascript.

, JSON , ie7, JSON , eval , , JSON , , .

:

http://code.flickr.com/blog/2009/03/18/building-fast-client-side-searches/

+2

BSON

BSON, JSON, - JSON- . JSON, BSON . BSON , , JSON. , BSON Date BinData.

http://kaijaeger.com/articles/introducing-bison-binary-interchange-standard.html

+3

MongoDB - - . - BSON.
, BSON Javascript ( ), , .

Protocol Buffers; JS encoder/decoder, .
- .

, , BSON , JSON; , protbuf - , .

+1

Source: https://habr.com/ru/post/1795697/


All Articles