Class YsonParser


  • public class YsonParser
    extends java.lang.Object
    Parser of YSON data.

    Class throws YsonError if yson is malformed. All IO errors are translated to UncheckedIOException.

    • Constructor Detail

      • YsonParser

        public YsonParser​(java.io.InputStream input)
      • YsonParser

        public YsonParser​(java.io.InputStream input,
                          int bufferSize)
      • YsonParser

        public YsonParser​(java.io.InputStream input,
                          byte[] buffer)
      • YsonParser

        public YsonParser​(byte[] buffer)
      • YsonParser

        public YsonParser​(byte[] buffer,
                          int offset,
                          int length)
    • Method Detail

      • parseNode

        public void parseNode​(YsonConsumer consumer)
        Parse YSON node.

        This method will consume whole input stream and will throw YsonError exception if stream contains trailing (non whitespace) bytes.

      • parseAttributes

        public int parseAttributes​(YsonConsumer consumer)
        Parse only attributes and return its size in bytes.
      • parseListFragment

        public void parseListFragment​(YsonConsumer consumer)
        Parse YSON list fragment

        This method will consume whole input stream and will throw YsonError exception if stream contains trailing (non whitespace) bytes.