Hi I'm having the following json data
{
"actionslist": [
{
"type": "SET_TP_DST",
"port": 135
},
{
"type": "OUTPUT",
"port": {
"node": {
"id": "00:00:00:00:00:00:00:03",
"type": "OF"
},
"id": "2",
"type": "OF"
}
}
]
}
I want to deserialize this json using gson.fromJson
. But the problem here is the port
sometimes holds a number and sometimes holds an object. How can I get the port
to get both object and the number?