Rohit Bajaj
asked on
renameing keys in Json using Java
HI,
I have a json string and a mapping. I want to rename all the keys in the json string according to the map.
eg. json ={"dd":"12","dt":14","df": "55"}
and map = "dd":"date_dd","df":"date_ df"
then my output should be {"date_dd":"12","dt":14"," date_df":" 55"}
The mapping basically provides the renamed values of certain keys and we have to replace all the key names which fall in the mapping which the new name.
Thanks
I have a json string and a mapping. I want to rename all the keys in the json string according to the map.
eg. json ={"dd":"12","dt":14","df":
and map = "dd":"date_dd","df":"date_
then my output should be {"date_dd":"12","dt":14","
The mapping basically provides the renamed values of certain keys and we have to replace all the key names which fall in the mapping which the new name.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.