用java的谷歌库gson解析JSON,如下的json数据,该如何定义java类??

求高人指点,用java的谷歌库gson解析JSON,如下的json数据,该如何定义java类?? 在线等...............

{
"00:00:8e:d7:ba:ac:88:47": {
"flow-mod-3": {
"version": 1,
"type": "FLOW_MOD",
"length": 72,
"xid": 0,
"match": {
"dataLayerDestination": "00:00:00:00:00:00",
"dataLayerSource": "00:00:00:00:00:00",
"dataLayerType": "0x0000",
"dataLayerVirtualLan": -1,
"dataLayerVirtualLanPriorityCodePoint": 0,
"inputPort": 1,
"networkDestination": "0.0.0.0",
"networkDestinationMaskLen": 0,
"networkProtocol": 0,
"networkSource": "0.0.0.0",
"networkSourceMaskLen": 0,
"networkTypeOfService": 0,
"transportDestination": 0,
"transportSource": 0,
"wildcards": 4194302
},
"cookie": 45035997351236010,
"command": 0,
"idleTimeout": 0,
"hardTimeout": 0,
"priority": -32768,
"bufferId": -1,
"outPort": -1,
"flags": 0,
"actions": [ ],
"lengthU": 72
}
},
"00:00:8e:d7:ba:ac:88:46": {
"flow-mod-1": {
"version": 1,
"type": "FLOW_MOD",
"length": 72,
"xid": 0,
"match": {
"dataLayerDestination": "00:00:00:00:00:00",
"dataLayerSource": "00:00:00:00:00:00",
"dataLayerType": "0x0000",
"dataLayerVirtualLan": -1,
"dataLayerVirtualLanPriorityCodePoint": 0,
"inputPort": 1,
"networkDestination": "0.0.0.0",
"networkDestinationMaskLen": 0,
"networkProtocol": 0,
"networkSource": "0.0.0.0",
"networkSourceMaskLen": 0,
"networkTypeOfService": 0,
"transportDestination": 0,
"transportSource": 0,
"wildcards": 4194302
},
"cookie": 45035997351236010,
"command": 0,
"idleTimeout": 0,
"hardTimeout": 0,
"priority": -32768,
"bufferId": -1,
"outPort": -1,
"flags": 0,
"actions": [ ],
"lengthU": 72
},
"flow-mod-2": {
"version": 1,
"type": "FLOW_MOD",
"length": 72,
"xid": 0,
"match": {
"dataLayerDestination": "00:00:00:00:00:00",
"dataLayerSource": "00:00:00:00:00:00",
"dataLayerType": "0x0000",
"dataLayerVirtualLan": -1,
"dataLayerVirtualLanPriorityCodePoint": 0,
"inputPort": 1,
"networkDestination": "0.0.0.0",
"networkDestinationMaskLen": 0,
"networkProtocol": 0,
"networkSource": "0.0.0.0",
"networkSourceMaskLen": 0,
"networkTypeOfService": 0,
"transportDestination": 0,
"transportSource": 0,
"wildcards": 4194302
},
"cookie": 45035997351236010,
"command": 0,
"idleTimeout": 0,
"hardTimeout": 0,
"priority": -32768,
"bufferId": -1,
"outPort": -1,
"flags": 0,
"actions": [ ],
"lengthU": 72
}
}
}

查看全部
xuexiuxiao
汤去三面
2015/06/25 06:25
  • json
  • 点赞
  • 收藏
  • 回答
    私信

4个回复