vertx-lang-scala-docs_2.12 3.6.3 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package core
  Definition Classes
    scala
-  package cli
  Definition Classes
    core
-  package datagram
  Definition Classes
    core
-  package dns
  Definition Classes
    core
-  package eventbus
  Definition Classes
    core
-  package file
  Definition Classes
    core
-  package http
  Definition Classes
    core
-  package metrics
  Definition Classes
    core
-  package net
  Definition Classes
    core
-  package parsetools
  Definition Classes
    core
- JsonEvent
- JsonParser
- RecordParser
-  package shareddata
  Definition Classes
    core
-  package streams
  Definition Classes
    core

p

io.vertx.scala.core

# parsetools 

#### package parsetools

 
Ordering

1. Alphabetic

Visibility

1. Public
2. All

### Type Members

1.  class JsonEvent extends AnyRef

   A JSON event emited by the io.vertx.scala.core.parsetools.JsonParser.

2.  class JsonParser extends ReadStream[JsonEvent] with Handler[Buffer]

   A parser class which allows to incrementally parse json elements and emit json parse events instead of parsing a json element fully.

   A parser class which allows to incrementally parse json elements and emit json parse events instead of parsing a json element fully. This parser is convenient for parsing large json structures.

   The parser also parses concatenated json streams or line delimited json streams.

   The parser can also parse entire object or array when it is convenient, for instance a very large array of small objects can be parsed efficiently by handling array start/end and object events.

   Whenever the parser fails to parse or process the stream, the io.vertx.scala.core.parsetools.JsonParser#exceptionHandler is called with the cause of the failure and the current handling stops. After such event, the parser should not handle data anymore.

3.  class RecordParser extends ReadStream[Buffer] with Handler[Buffer]

   A helper class which allows you to easily parse protocols which are delimited by a sequence of bytes, or fixed size records.

   A helper class which allows you to easily parse protocols which are delimited by a sequence of bytes, or fixed size records.

   Instances of this class take as input io.vertx.scala.core.buffer.Buffer instances containing raw bytes, and output records.

   For example, if I had a simple ASCII text protocol delimited by '\n' and the input was the following:

       buffer1:HELLO\nHOW ARE Y
       buffer2:OU?\nI AM
       buffer3: DOING OK
       buffer4:\n

   Then the output would be:

       buffer1:HELLO
       buffer2:HOW ARE YOU?
       buffer3:I AM DOING OK

   Instances of this class can be changed between delimited mode and fixed size record mode on the fly as individual records are read, this allows you to parse protocols where, for example, the first 5 records might all be fixed size (of potentially different sizes), followed by some delimited records, followed by more fixed size records.

   Instances of this class can't currently be used for protocols where the text is encoded with something other than a 1-1 byte-char mapping.

   Please see the documentation for more information.

### Value Members

1.  object JsonEvent
2.  object JsonParser
3.  object RecordParser

### Ungrouped