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

来源:互联网 发布:linux查看tmp目录大小 编辑:程序博客网 时间:2024/05/17 03:56

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.

 

各数据类型序列化结果:

 

0 0
原创粉丝点击