Skip to content

Commit

Permalink
JsonParser needs to have a way to get current event (jakartaee#303)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos authored Sep 30, 2021
1 parent 54b2547 commit d166d5d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/src/main/java/jakarta/json/stream/JsonParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,17 @@ enum Event {
*/
Event next();

/**
* Returns the event for the current parsing state.
*
* @return the event for the current parsing state
*
* @since 2.1
*/
default public Event currentEvent() {
throw new UnsupportedOperationException();
}

/**
* Returns a {@code String} for the name in a name/value pair,
* for a string value or a number value. This method should only be called
Expand Down

0 comments on commit d166d5d

Please sign in to comment.