Binary Data in JSON String. Something better than Base64

后端 未结 15 1295
一向
一向 2020-11-21 23:03

The JSON format natively doesn\'t support binary data. The binary data has to be escaped so that it can be placed into a string element (i.e. zero or more Unicode chars in d

15条回答
  •  一整个雨季
    2020-11-21 23:58

    If you deal with bandwidth problems, try to compress data at the client side first, then base64-it.

    Nice example of such magic is at http://jszip.stuartk.co.uk/ and more discussion to this topic is at JavaScript implementation of Gzip

提交回复
热议问题