【发布时间】:2018-07-23 14:17:48
【问题描述】:
如果可能的话,我更愿意使用 com.fasterxml.jackson。 我正在寻找一种像这样解析 json 的方法:
{
"availability":{
"48":{ //this is dynamic (in next response that number can be different, like 1023)
"2018-02-08":{ //this is dynamic
"temp":null
},
"2018-02-09":{ //this is dynamic
"temp":null
}
},
"49":{ //this is dynamic
"2018-02-08":{ //this is dynamic
"temp":null
},
"2018-02-09":{ //this is dynamic
"temp":null
}
}
}
}
【问题讨论】:
-
简单地将动态数据表示为Map
-
动态是什么意思?
-
到目前为止你尝试过什么?还有哪些解析器喜欢snakeyaml?
标签: java json dynamic fasterxml