private Map < String , Object > getIncludedResources ( JsonNode parent ) throws IOException , IllegalAccessException , InstantiationException { Map < String , Object > result = new HashMap <> ( ) ; if ( parent . has ( INCLUDED ) ) { for ( JsonNode jsonNode : parent . get ( INCLUDED ) ) { String type = jsonNode . get ( TYPE ) . asText ( ) ; Class < ? > clazz = configuration . getTypeClass ( type ) ; if ( clazz != null ) { Object object = readObject ( jsonNode , clazz , false ) ; if ( object != null ) { result . put ( createIdentifier ( jsonNode ) , object ) ; } } else if ( ! deserializationFeatures . contains ( DeserializationFeature . ALLOW_UNKNOWN_INCLUSIONS ) ) { throw new IllegalArgumentException ( "Included section contains unknown resource type: " + type ) ; } } } return result ; }
Parses out included resources excluding relationships .