blob: 83ed327de3e36f0ce1e27054a7c77bcde9589651 [file]
/*
* Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
package org.eclipse.yasson.internal;
import jakarta.json.stream.JsonParser;
/**
* Jsonb parsing helper methods on top of JSON-P parser.
*/
public interface JsonbParser extends JsonParser {
/**
* Moves parser to required event, if current event is equal to required does nothing.
*
* @param event Required event.
*/
void moveTo(JsonParser.Event event);
/**
* Moves parser cursor to any JSON value.
*
* @return Event.
*/
Event moveToValue();
/**
* Moves parser cursor to START_OBJECT or START_ARRAY.
*
* @return Event.
*/
Event moveToStartStructure();
/**
* Current level of JsonbRiParser.
*
* @return Current level.
*/
JsonbRiParser.LevelContext getCurrentLevel();
/**
* Skips a value or a structure.
* If current event is START_ARRAY or START_OBJECT, whole structure is skipped to end.
*/
void skipJsonStructure();
}