Binary Data in JSON String. Something better than Base64

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

    Smile format

    It's very fast to encode, decode and compact

    Speed comparison (java based but meaningful nevertheless): https://github.com/eishay/jvm-serializers/wiki/

    Also it's an extension to JSON that allow you to skip base64 encoding for byte arrays

    Smile encoded strings can be gzipped when space is critical

提交回复
热议问题