我们如何添加一个宁静的响应结果List的名称

时间:2018-01-29 14:14:35

标签: json spring web-services response

我有一个服务正在生成我希望给出每个列表名称的结果列表,找到示例。

当前结果:

[
[
    {
        "marketname": "East",
        "totalmarketcount": 22
    },
    {
        "marketname": "Midwest",
        "totalmarketcount": 9275
    },
    {
        "marketname": "West",
        "totalmarketcount": 25
    }
],
[
    {
        "discarded": 0,
        "received": 1268,
        "coded": 6031,
        "completed": 5951
    }
],

但我想:

 {
"EncoderCodedlist": [
    {
        "totalcount": 6001,
        "encountercoder": "name1"
    },
    {
        "totalcount": 41,
        "encountercoder": "name8"
    },
    {
        "totalcount": 6,
        "encountercoder": "name6"
    },
    {
        "totalcount": 3,
        "encountercoder": "name4"
    },
    {
        "totalcount": 3,
        "encountercoder": "name2"
    }
]

}

我正在使用Spring Boot和Spring rest,我们生成了json对象。

0 个答案:

没有答案