4.pickling 和unpickling是什么?

pickling 和unpickling是什么?

Pickle module accepts any Python object and converts it into a string representation and dumps it into a file by using dump function, this process is called pickling.

While the processing of retrieving original Python objects from the stored string representation is called unpickling.

Pickle模块可以处理所有的Python对象并将其转换为字符串的表现形式,并可以使用dump函数将其转储到文件中,这个过程称为Pickle。

从存储的字符串中检索原始Python对象的过程称为unpickle。

 

json只能处理简单的,而pickle是用来处理复杂的数据类型。

json和pickle的操作和json一模一样。

json和pickle数据序列化:http://www.cnblogs.com/zoe233/p/7091119.html

转载于:https://www.cnblogs.com/zoe233/p/7410950.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值