In my application i need to find the currency exchange rates of all countries with usd as base.I got a json as the output which contains the exchange rates.Below is the json.
{
"disclaimer": "Exchange rates",
"license": "Data sourced from various providers",
"timestamp": 1361055609,
"base": "USD",
"rates": {
"AED": 3.672869,
"AFN": 51.769999,
"ALL": 104.798751,
"AMD": 406.549996,
"ANG": 1.7887,
"AOA": 95.946132,
"ARS": 5.009655,
"AUD": 0.969258,
"AWG": 1.789967,
"AZN": 0.7847,
"BAM": 1.465127,
"BBD": 2,
"BDT": 78.95455,
"BGN": 1.465315,
"BHD": 0.376979,
"BIF": 1573.6325,
"BMD": 1,
"BND": 1.235676,
"BOB": 6.984993,
"BRL": 1.963769,
....
}
}
Now i need to extracts these rates into a hashmap where the currency code as the key and exchange rate as value.How can i do that in java.