我有一个基于网络服务请求的 JSON 响应。
[
{
"type": " --T::00"
},
{
"address": "10049 College Way N",
"longitude": "-122.335022",
"latitude": "47.701756",
"incident_number": "F110104009",
"type": "Aid Response",
"report_location": {
"needs_recoding": false,
"longitude": "-122.335022",
"latitude": "47.701756"
}
},
{
"address": "5929 Beach Dr Sw",
"longitude": "-122.397816",
"latitude": "47.550431",
"incident_number": "F110104008",
"type": "Aid Response",
"report_location": {
"needs_recoding": false,
"longitude": "-122.397816",
"latitude": "47.550431"
}
}
有没有办法操纵有效负载以将其从标头 { "type": " --T::00" } 中删除,或者只是将其添加到页脚中。我目前使用 JSON 到对象转换器并添加了 java.util.List。我看过使用 groovy 转换器添加到消息中的帖子,但是如何删除诸如标题之类的元素呢?
谢谢!