Django reset framework: 序列化

序列化与反序列化

将模型转换为json 称之为 序列化
将json转换为模型 称之为 反序列化

何时进行序列化与反序列化

序列化:当后端将数据库中信息取出返回给前端时,要进行序列化操作
反序列化:当需要将用户发送的数据存储到数据库之前那,需要反序列化

前端给后端:反序列化
后端给前端:序列化

参考链接

https://cloud.tencent.com/developer/article/1657638
https://blog.csdn.net/qq_31742423/article/details/82895277

posted @ 2021-11-15 10:53  胸怀丶若谷  阅读(59)  评论(0编辑  收藏  举报