public < T > T getResourceAsObject ( final TypeToken < T > type ) { try { //noinspection unchecked return ( T ) objectMapper . readValue ( ( ( ContentRepresentation ) getUnderlyingRepresentation ( ) ) . getContent ( ) , objectMapper . constructType ( type . getType ( ) ) ) ; } catch ( IOException e ) { LOGGER . warn ( "failed to parse resource as object: {}" , e . getMessage ( ) ) ; throw new RuntimeException ( e ) ; } }
Parse root resource as an object .