开发者

parsing JSON in java?

开发者 https://www.devze.com 2022-12-26 14:46 出处:网络
How to parsing JSON in java? { \"code\": 100, \"message\": \"SUCCESS\", \"result\": { \"list\": [ { \"cardNumber\": \"ALUFZZ5SZ1Q5\",

How to parsing JSON in java?

{
    "code": 100,
    "message": "SUCCESS",
    "result": {
        "list": [
            {
                "cardNumber": "ALUFZZ5SZ1Q5",
                "expireTime": 1270742400,
                "surplusThreshold": 4,
                "uid":开发者_JS百科 771292,
                "useTime": 1270214375,
                "wareId": 1145
            },
            {
                "cardNumber": "ALUFZZ5SZ1QD",
                "expireTime": 1270828800,
                "surplusThreshold": 7,
                "uid": 784289,
                "useTime": 1270302200,
                "wareId": 1145
            },
            {
                "cardNumber": "ALUFZZ5SZ1RC",
                "expireTime": 1270828800,
                "surplusThreshold": 10,
                "uid": 773664,
                "useTime": 1270300871,
                "wareId": 1145
            },
            {
                "cardNumber": "ALUFZZ5SZ1UM",
                "expireTime": 1270828800,
                "surplusThreshold": 10,
                "uid": 779560,
                "useTime": 1270282841,
                "wareId": 1145
            },
            {
                "cardNumber": "ALUFZZ5SZ1VT",
                "expireTime": 1270656000,
                "surplusThreshold": 2,
                "uid": 754099,
                "useTime": 1270106775,
                "wareId": 1145
            }
        ],
        "pageCount": 61,
        "pageIndex": 2,
        "pageSize": 5,
        "recordCount": 308
    }
}


Follow the examples in gson-user-guide

Download Site

More json libraries are listet at json.org


I have had good results with the StringTree JSON library.

0

精彩评论

暂无评论...
验证码 换一张
取 消