public String getFieldName ( ) throws IOException { if ( jsonParser . getCurrentToken ( ) != JsonToken . FIELD_NAME ) { throw new IOException ( "Expected a field of type " + JsonToken . FIELD_NAME + ", but found a field of type " + jsonParser . getCurrentToken ( ) ) ; } return jsonParser . getCurrentName ( ) ; }
If the current token is a field name this method returns the name of the field .