Class JsonStructureToParserAdapter

  • All Implemented Interfaces:
    Closeable, AutoCloseable, javax.json.stream.JsonParser

    public class JsonStructureToParserAdapter
    extends Object
    implements javax.json.stream.JsonParser
    Adapter for JsonParser, that reads a JsonStructure content tree instead of JSON text. Yasson and jsonb API components are using JsonParser as its input API. This adapter allows deserialization of JsonStructure into java content tree using same components as when parsing JSON text.
    • Constructor Detail

      • JsonStructureToParserAdapter

        public JsonStructureToParserAdapter​(javax.json.JsonStructure structure)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface javax.json.stream.JsonParser
      • next

        public javax.json.stream.JsonParser.Event next()
        Specified by:
        next in interface javax.json.stream.JsonParser
      • getString

        public String getString()
        Specified by:
        getString in interface javax.json.stream.JsonParser
      • isIntegralNumber

        public boolean isIntegralNumber()
        Specified by:
        isIntegralNumber in interface javax.json.stream.JsonParser
      • getInt

        public int getInt()
        Specified by:
        getInt in interface javax.json.stream.JsonParser
      • getLong

        public long getLong()
        Specified by:
        getLong in interface javax.json.stream.JsonParser
      • getBigDecimal

        public BigDecimal getBigDecimal()
        Specified by:
        getBigDecimal in interface javax.json.stream.JsonParser
      • getLocation

        public javax.json.stream.JsonLocation getLocation()
        Specified by:
        getLocation in interface javax.json.stream.JsonParser
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface javax.json.stream.JsonParser