Well, the only way I can think of is to create a special auto bank that will have the List<Person> property. For example:
public interface Result { void setPersons(List<Person> persons); List<Person> getPersons(); }
And an example json string:
{ persons:[ {"name":"Thomas Broyer"}, {"name":"Colin Alworth"} ] }
UPDATE: The workaround when entering JSON is an array (as suggested by persons[0] in the comments). For example. JSON looks like this:
[{"name":"Thomas Broyer"},{"name":"Colin Alworth"}]
And the analysis code is as follows:
AutoBeanCodex.decode(factory, Result.class, "{\"persons\": " + json + "}").getPersons();
jusio
source share