hessian原理解析三(序列化协议)

    xiaoxiao2021-03-26  30

    1、序列化

      序列化:将数据结构或对象转换成二进制串的过程

      反序列化:将在序列化过程中所生成的二进制串转换成数据结构或者对象的过程

          目的:保存对象状态或用于网络传输

    2、hessian 序列化协议 1.0 参考官方文档:http://hessian.caucho.com/doc/hessian-1.0-spec.xtp

    9 primitive types

    boolean 32-bit

    int 64-bit

    long 64-bit

    double 64-bit

    date UTF8-encoded

    string UTF8-encoded

    xml

    raw binary data

    remote objects

    2 combining constructs:

    list for lists and arrays

    map for objects and hash tables.

    2 special contructs:

    null for null values

    ref for shared and circular object references.

     

    各数据类型序列化结果:

     

    转载请注明原文地址: https://ju.6miu.com/read-661024.html

    最新回复(0)