question: public < T > JSONAPIDocument < List < T > > readDocumentCollection ( InputStream dataStream , Class < T > clazz ) { try { resourceCache . init ( ) ; JsonNode rootNode = objectMapper . readTree ( dataStream ) ; ValidationUtils . ensureNotError ( objectMapper , rootNode ) ; ValidationUtils . ensureCollection ( rootNode ) ; resourceCache . cache ( parseIncluded ( rootNode ) ) ; List < T > resourceList = new ArrayList < > ( ) ; for ( JsonNode element : rootNode . get ( DATA ) ) { T pojo = readObject ( element , clazz , true ) ; resourceList . add ( pojo ) ; } JSONAPIDocument < List < T > > result = new JSONAPIDocument < > ( resourceList , objectMapper ) ; if ( rootNode . has ( META ) ) { result . setMeta ( mapMeta ( rootNode . get ( META ) ) ) ; } if ( rootNode . has ( LINKS ) ) { result . setLinks ( new Links ( mapLinks ( rootNode . get ( LINKS ) ) ) ) ; } return result ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } finally { resourceCache . clear ( ) ; } }
target:  Reads JSON API spec document and converts it into collection of target type objects.