1 | let jsonObject = try NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers) |
结果如下:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35(
{
id = 1;
state = closed;
text = "Node 1";
},
{
id = 2;
state = open;
text = "Node 2";
},
{
id = 3;
state = open;
text = "Node 3";
},
{
id = 4;
state = open;
text = "Node 4";
}
)
(
"Node 1",
"Node 2",
"Node 3",
"Node 4"
)
{
id = 1;
state = closed;
text = "Node 1";
}
Optional(Node 1)
closed