Specified object from JSONObject
问题 I have JSONObject which contains as shown below and created class Markets contained all fields. I want put JSONObject elements to created object of Markets . Example: Markets markets = new Markets() ,then put elements from JSONObject to markets and I want to be able to get markets.getInstrumentName() . How can I do this ? I try using Gson , like this Markets markets = gson2.fromJson(jsonObject, Markets.class); but there are different types and it is wrong way. JSONObject : { "map": {