private List < T > unmarshallJsonToList ( JsonUnmarshallerContext context ) throws Exception { List < T > list = new ArrayList < T > ( ) ; if ( context . getCurrentToken ( ) == JsonToken . VALUE_NULL ) { return null ; } while ( true ) { JsonToken token = context . nextToken ( ) ; if ( token == null ) { return list ; } if ( token == END_ARRAY ) { return list ; } else { list . add ( itemUnmarshaller . unmarshall ( context ) ) ; } } }
Unmarshalls the current token in the Json document to list .