Binary Data in JSON String. Something better than Base64

后端 未结 15 1297
一向
一向 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:49

    (Edit 7 years later: Google Gears is gone. Ignore this answer.)


    The Google Gears team ran into the lack-of-binary-data-types problem and has attempted to address it:

    Blob API

    JavaScript has a built-in data type for text strings, but nothing for binary data. The Blob object attempts to address this limitation.

    Maybe you can weave that in somehow.

提交回复
热议问题