public List < Action > listFromJSON ( JSONArray in ) throws JSONConverterException { List < Action > l = new ArrayList <> ( in . size ( ) ) ; for ( Object o : in ) { if ( ! ( o instanceof JSONObject ) ) { throw new JSONConverterException ( "Expected an array of JSONObject but got an array of " + o . getClass ( ) . getName ( ) ) ; } l . add ( fromJSON ( ( JSONObject ) o ) ) ; } return l ; }
Convert a list of json - encoded actions .