我想解析一个复杂的 JSON 结构,但因为它不是一个直接的 JSON 结构而苦苦挣扎。这是示例:
[
{
"target":"collectd.matrix.oracle.avg_resp_time",
"datapoints":[
[8.0, 1365158480],
[null, 1365158490],
[null, 1365158500],
[null, 1365158510],
[null, 1365158520],
[null, 1365158530],
[8.0, 1365158540],
[null, 1365158550],
[null, 1365158560],
[null, 1365158570],
[null, 1365158580],
[null, 1365158590],
[8.0, 1365158600],
[null, 1365158610],
[null, 1365158620],
[null, 1365158630],
[null, 1365158640],
[null, 1365158650],
[8.0, 1365158660],
[null, 1365158670],
[null, 1365158680],
[null, 1365158690],
[null, 1365158700],
[null, 1365158710],
[null, 1365158720],
[null, 1365158730],
[null, 1365158740],
[null, 1365158750],
[null, 1365158760],
[null, 1365158770]
]
}
]
我想捕获每个字段的值,eg:X=8.0,Y=1365158540
并且需要一些帮助或逻辑来解析它。
谢谢,索汉