I am Trying to parse nested JSON, But i don't know the format of JSON...I want all the Keys and Values of JSON.
Example:
{
"txnSpecificData1": "11",
"txnSpecificData2": "21",
"merchantData": {
"merchantSpecificData1": "111",
"merchantSpecificData2": "222",
"merchantSpecificData3": {
"data1": "1",
"data2": "2"
}
}
}
Now I want all Keys and their Values...I tried JSONParser but it is not giving all keys. Please some one guide me to do this.
I need value based on key.. Let's say If i give key as "merchantSpecificData2" it should return me value.
O/P should be MAP with all Key and Values:
OutPut Map : : : {txnSpecificData1=11, txnSpecificData1=22, merchantSpecificData1=111, merchantSpecificData2=222,data1=1,data2=2}