我有与此类似的 JSON,带有许多 id 和 ref 键:
jSon = {
"id":"node1",
"name":"Languages",
"rel":"",
"children":1,
"step":1,
"path":1,
"nodes":[
{
"id":"node2",
"name":"Java",
"rel":"Pure Object Oriented Prog",
"children":1,
"step":2,
"path":2,
"nodes":[
{
"id":"node3",
"name":"C#",
"rel":"Framework",
"children":0,
"step":3,
"path":3,
"nodes":[]
},{
"id":"node4",
"name":"C++",
"rel":"OOPS",
"children":0,
"step":3,
"path":4,
"nodes":[]
}]
}]
};
在Objective-C中,我怎样才能到达元素的父节点,其中键id和值是我们说的node4或其他的。
在 xcode 中,我试图解析来自MVCweb的 JSON 数据API。
我的web.apiJSON 是这个
当我注释掉时Newtonsoft.Json.PreserveReferencesHandling.Objects,JSON 变得非常大,通常像 35MB。
当我使用PreserveReferencesHandling.Objects.net 放置id和ref键来重新发送对象时。
在 JSON 中旅行时,如果到达ref带有 value 的键asdfg,我必须使用 keyid和 value `asdf.
这可能Xcode吗?