public < T > Tuple2 < String , T > nextKeyValue ( Class < T > clazz ) throws IOException { if ( currentValue . getKey ( ) != NAME ) { throw new IOException ( "Expecting NAME, but found " + jsonTokenToStructuredElement ( null ) ) ; } String name = currentValue . getValue ( ) . asString ( ) ; consume ( ) ; return Tuple2 . of ( name , nextValue ( clazz ) ) ; }
Reads the next key - value pair with the value being of the given type