如何从java中的JSON对象获取依赖于它的值

时间:2014-03-05 12:40:17

标签: java json

我有一个下面的JSON对象。我想从“数据的2个对象中获取” href “值,其中”名称“=” hl7sender2appender “ STRONG>”。实际上,我的场景中有两个以上的对象,依赖是“ name ”。

{
"total": 2,
"data": [
    {
        "name": "flightfarejaws",
        "id": "local$aca210b4-b94e-4401-b1c9-28d103c6e601",
        "lastModified": "Wed, 5 Mar 2014 16:30:37.929 IST",
        "applications": [
            "local$0176c872-73f9-4302-923d-73c0c402fedd"
        ],
        "href": "http://localhost:8585/mmc/api/deployments/local$aca210b4-b94e-4401-b1c9-28d103c6e601",
        "status": "DEPLOYED",
        "servers": [
            "local$f08ab005-11d6-41d2-824c-dab55b993a71"
        ],
        "clusterIds": [],
        "reconciled": false,
        "clusterNames": []
    },
    {
        "name": "hl7sender2appender",
        "id": "local$563beec8-ec05-470f-ae54-0f53d226d2c1",
        "lastModified": "Mon, 3 Mar 2014 16:15:45.816 IST",
        "applications": [
            "local$a81a3780-2a93-4261-9d0f-1f54cb976742"
        ],
        "href": "http://localhost:8585/mmc/api/deployments/local$563beec8-ec05-470f-ae54-0f53d226d2c1",
        "status": "UNDEPLOYED",
        "servers": [
            "local$f08ab005-11d6-41d2-824c-dab55b993a71"
        ],
        "clusterIds": [],
        "reconciled": false,
        "clusterNames": []
    }
]}

任何人都可以告诉我在Java中实现这一目标的最佳方法。

0 个答案:

没有答案