Method for copying contents of the current event
and following events that it encloses the given parser instance points to.
So what constitutes enclosing? Here is the list of events that have associated enclosed events that will get copied:
- {@link JsonToken#START_OBJECT}: all events up to and including matching (closing) {@link JsonToken#END_OBJECT} will be copied
- {@link JsonToken#START_ARRAY}all events up to and including matching (closing) {@link JsonToken#END_ARRAY} will be copied
- {@link JsonToken#FIELD_NAME} the logical value (whichcan consist of a single scalar value; or a sequence of related events for structured types (Json Arrays, Objects)) will be copied along with the name itself. So essentially the whole field entry (name and value) will be copied.
After calling this method, parser will point to the last event that was copied. This will either be the event parser already pointed to (if there were no enclosed events), or the last enclosed event copied.