JSON对象到Java对象

时间:2017-08-24 06:21:52

标签: java json gson

我必须使用Java从代码中获取fieldName值作为列表。使用JSON解析器我将字段数据作为JsonArray但在数组中我无法获取fieldName值。帮我做。

{
"fluentMethods": true,
"relationships": [],
"fields": [
    {
        "fieldName": "streetAddress",
        "fieldType": "String"
    },
    {
        "fieldName": "postalCode",
        "fieldType": "String"
    },
    {
        "fieldName": "city",
        "fieldType": "String"
    },
    {
        "fieldName": "stateProvince",
        "fieldType": "String"
    }
],
"changelogDate": "20170809051415",
"entityTableName": "location",
"dto": "no",
"pagination": "no",
"service": "no"

}

0 个答案:

没有答案