[似乎我keep getting stuck每当我伸出手来转换一些JSON时。
解析为Aeson.Value
...后
{
"action": {
"action": "reply",
"replies": [
"Does this work?",
"What about this?"
]
},
"suggestions": [...],
"inputs": [...]
}
...我正在尝试将其转换为...
{
"action": "reply",
"replies": [
"Does this work?",
"What about this?"
]
"suggestions": [...],
"inputs": [...]
}
基本上,我正在尝试将嵌套在顶级action
键中的所有键值对带到顶级本身,最后删除顶级action
键。 (请注意,顶层action
键中有一个嵌套的action
键-这不是拼写错误。)>
[似乎每当我伸出手来转换一些JSON时,我总是会卡住。将其解析为Aeson.Value ... {“ action”:{“ action”:“ reply”,“ replies”:[“ Does ...
使用lens-aeson
包装中的镜头,我想您想要的是像这样的东西: