1. 程式人生 > >hessian原理解析三(序列化協議)

hessian原理解析三(序列化協議)

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.

各資料型別序列化結果: