NSObject数据模型的JSON表示

编程入门 行业动态 更新时间:2024-10-11 07:29:17
本文介绍了NSObject数据模型的JSON表示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图解析我在数据模型中填充的所有数据。我在nsobject中有一些nsmutabledictionary,只是好奇是有可能得到该对象类型的jsonrepresentation?我使用ASIHTTPREQUEST获得了JSON的无效类型。所以这里显而易见的关注是,如果这是可能的,或者我必须迭代通过对象和插入它在nsdictionary然后解析它?

I am trying to parse all the data that I have populated in my data model. I have some nsmutabledictionary within the nsobject, and just curious is it possible to get jsonrepresentation of that object type? I got Not valid type for JSON using ASIHTTPREQUEST. So the obvious concern here is, if that is possible or I have to iterate through the object's and insert it in nsdictionary and then parse it?

谢谢

推荐答案

您可能想要检查我的实现序列化NSObjects到JSON,反之亦然 - github/QBurst/KVCObjectSerializer

You might want to checkout my implementation for serializing NSObjects to JSON and vice versa - github/QBurst/KVCObjectSerializer

更多推荐

NSObject数据模型的JSON表示

本文发布于:2023-11-30 19:26:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1651223.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据模型   NSObject   JSON

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!