序列化
把内存数据转化成字符,叫做序列化。
反序列化
把字符转化成内存数据类型,叫做反序列化。
json
json.dumps() json.loads()
只是把数据类型转换成字符串存到内存中有什么意义?
1. 可以通过网络传输字节。把你的内存数据通过网络传输远程给其他人。
2. 定义了不同语言之间的交互规则。跨语言。。。。
能支持的数据类型有:int,str,dict,tuple,list
pickle
pickle.dump()
pickle.load()
只能在python中使用。
支持python中所有的数据类型