我正在尝试清理Clojure中的一些JSON数据.JSON文档中的某些值封装在具有关联(且不再需要)元数据的对象中.我从一个JSON文档开始,如:
{ "household": {
"address": {
"street": { "value": "123 Fire Ln", "foo": "bar1" },
"zip": { "value": "01234", "foo": "bar2" }
},
"persons": [
{
"id": "0001",
"name": { "value": "John Smith", "foo": "bar3" }
},
{
"id": "0002",
"name": { "value": "Jane Smith", "foo": "bar4" }
}
]
} }
Run Code Online (Sandbox Code Playgroud)
使用Cheshire我解析这个JSON并获得以下数据结构:
{ "household" {
"address" {
"street" {"value" "123 Fire Ln", "foo" "bar1"},
"zip" {"value" "01234", "foo" "bar2"}
},
"persons" [
{"id" "0001", "name" {"value" "John Smith", "foo" …Run Code Online (Sandbox Code Playgroud) clojure ×1