简体   繁体   English

序列化空值的大小

[英]Size of a serialized null values

I have to send through the network a complex object which references are almost all of them Null, but I wonder about the size of this object with this null references inside. 我必须通过网络发送一个复杂的对象,其引用几乎都是Null,但我想知道这个对象的大小,里面有这个空引用。

Which is the size of a null value contained in a serialized object? 哪个是序列化对象中包含的空值的大小?

I am evaluating if it is better to change the communication protocol, sending a simpler object, at the cost of not reusing the complex one, and make several simple one for each kind of communication I have. 我正在评估是否更好地改变通信协议,发送一个更简单的对象,代价是不重用复杂的对象,并为我的每种通信制作几个简单的对象。

对象序列化流协议可以看出,null本身应该是1字节(0x70)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM