I have an API for which one of its endpoints returns this json object (Comes from this API)
The problem about this is, it is not an array! It is a single simple object. But if you click the link and also think "wth is this documentation supposed to be": "BASE" actually respresents a currency like "USD". So in the end we have a map of Currency:Information pairs.
How can I parse this into an java object using Gson? Where there is an unkown number of "BASE":"INFO" mappings? (The keys are essentially unknown)
{
"BASE": {
"commoditymarketvalue": 0,
"futuremarketvalue": 0,
"settledcash": 0,
"exchangerate": 0,
"sessionid": 0,
"cashbalance": 0,
"corporatebondsmarketvalue": 0,
"warrantsmarketvalue": 0,
"netliquidationvalue": 0,
"interest": 0,
"unrealizedpnl": 0,
"stockmarketvalue": 0,
"moneyfunds": 0,
"currency": "string",
"realizedpnl": 0,
"funds": 0,
"acctcode": "string",
"issueroptionsmarketvalue": 0,
"key": "string",
"timestamp": 0,
"severity": 0
}
}