Now I am getting this JSON from API:
{"supplyPrice": {
"CAD": 78,
"CHF": 54600.78,
"USD": 20735.52
}}
But prices are dynamic, that's why I need JSON in this form
{
"supplyPrice": [
{
"name": "CAD",
"value": "78"
},
{
"name": "TRY",
"value": "34961.94"
},
{
"name": "CHF",
"value": "54600.78"
},
{
"name": "USD",
"value": "20735.52"
}
]
}
How to do this using GSON?