How to convert this in Java using List or Hashmap?
{"mappingSet": ["key1": "value1", "key2": "value2"]}
How to convert this in Java using List or Hashmap?
{"mappingSet": ["key1": "value1", "key2": "value2"]}
you could use some third party lib like
then you can covert json string to
example here
ObjectMapper objectMapper = new ObjectMapper();
String jsonArray = "[{ \"color\" : \"Black\", \"type\" : \"FIAT\" }, { \"color\" : \"Green\", \"type\" : \"NIKE\" }]";
JsonNode jsonNodeArray = objectMapper.readTree(jsonArray);
System.out.println(jsonNodeArray);
System.out.println(jsonNodeArray.get(0));