NSObject数据模型的JSON表示 [英] JSONRepresentation of NSObject Data Model

查看:193
本文介绍了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,反之亦然 - https://github.com/QBurst/KVCObjectSerializer

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

这篇关于NSObject数据模型的JSON表示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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