public ResultMatcher isObject ( ) { return new AbstractResultMatcher ( path , configuration ) { public void doMatch ( Object actual ) { isPresent ( actual ) ; Node node = getNode ( actual ) ; if ( node . getNodeType ( ) != OBJECT ) { failOnType ( node , "an object" ) ; } } } ; }
Fails if the selected JSON is not an Object or is not present .