Now, i’m working with the NSUserDefault and the NSDictionary, i save the NSDictionary in NSUserDefault, unfortunately i can’t, because NSDictionary return to Json has null value.
I need check if NSDictionary has null value and replace. How?
It’s NSDictionary,
({
ID:11,
name:21-12-2012,
des:"<null>",
url:
[
{
ID:1,
name: "<null>"
},
{
ID:2,
name:"<null>"
}
]
},
{
ID:12,
name:if i die young,
des:"<null>",
url:
[
{
ID:3,
name: "<null>"
},
{
ID:21,
name:"<null>"
}
]
})
could you please check this link, I think, it will be helpful to you, thanks for this link
Replace occurrences of NSNull in nested NSDictionary
UPDATE: I modified original a bit, and use some the function of converting nsarray to nsdictionary from this link Convert NSArray to NSDictionary, cuz I don’t know anything about your code, so I try to make my json string as close as possible to be the same as yours, and it’s work, see the following. 🙂from the code above, this is the result:
hope it help you :).