How do I convert a Json String with multiple Objects to java objects:
EDIT:It would seem unlikely that it would work, yet would this create 2 class instances of class Statement:
String JsonStr = "{\"bills\":[{\"amount\":\"13\",\"billId\":\"billid3\"}] ,\"bills\":[{\"amount\":\"155\",\"billId\":\"billid4\"}]}";
ObjectMapper mapper = new ObjectMapper();
Statement obj = mapper.readValue(JsonStr, obj.class);
If not, how do I write the code for a program that receives a JSON String with multiple unique objects of the same type(bank statement), and create the appropriate number of java object instances of it? I would greatly appreciate any help.
Thanks so much!
Stringisn't surrounded by quotes.