序列化和编码有什么区别? [英] what is the difference between Serializing and encoding?

查看:982
本文介绍了序列化和编码有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

序列化和编码有什么区别?
,何时应该在网路服务中使用?

解决方案

序列化是关于通过存储/传输介质以可维护结构的方式移动结构化数据。 编码更广泛,就像将数据转换为不同的表单一样,等等。也许你可以考虑在这个例子中序列化是编码的一个子集。



关于Web服务,您可能会考虑对某些数据进行序列化/反序列化,以生成/接收请求/响应 - 有效地传输消息。编码处于较低级别,就像您的消息传递/ Web服务类型/序列化机制如何工作。


what is the difference between Serializing and encoding? and when should i use each in a web service?

解决方案

Serializing is about moving structured data over a storage/transmission medium in a way that the structure can be maintained. Encoding is more broad, like about how said data is converted to different forms, etc. Perhaps you could think about serializing being a subset of encoding in this example.

With regard to a web service, you will probably be considering serializing/deserializing certain data for making/receiving requests/responses - effectively transporting "messages". Encoding is at a lower level, like how your messaging/web service type/serialization mechanism works under the hood.

这篇关于序列化和编码有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆