com.rojoma.json.v3.io

JsonEventIterator

class JsonEventIterator extends AbstractBufferedIterator[JsonEvent]

Turns a raw token-stream into an event stream, checking for JSON well-formedness.

A JsonEventIterator checks a token stream for syntactic correctness and produces events that reflect the syntax of JSON. It guarantees to demand no more input from the input iterator than is absolutely required.

As an extension, this class allows unquoted identifiers to be used as object keys.

See also

com.rojoma.json.v3.io.JsonEvent

com.rojoma.json.v3.io.JsonEventGenerator

com.rojoma.json.v3.io.FusedBlockJsonEventIterator

Linear Supertypes
AbstractBufferedIterator[JsonEvent], BufferedIterator[JsonEvent], AbstractIterator[JsonEvent], Iterator[JsonEvent], TraversableOnce[JsonEvent], GenTraversableOnce[JsonEvent], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JsonEventIterator
  2. AbstractBufferedIterator
  3. BufferedIterator
  4. AbstractIterator
  5. Iterator
  6. TraversableOnce
  7. GenTraversableOnce
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JsonEventIterator(text: String)

  2. new JsonEventIterator(reader: Reader)

  3. new JsonEventIterator(input: Iterator[JsonToken])

  4. new JsonEventIterator(text: String, fieldCache: (String, Int) ⇒ String)

  5. new JsonEventIterator(reader: Reader, fieldCache: (String, Int) ⇒ String)

  6. new JsonEventIterator(input: Iterator[JsonToken], fieldCache: (String, Int) ⇒ String)

Type Members

  1. class GroupedIterator[B >: A] extends AbstractIterator[Seq[B]] with Iterator[Seq[B]]

    Definition Classes
    Iterator

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def ++[B >: JsonEvent](that: ⇒ GenTraversableOnce[B]): Iterator[B]

    Definition Classes
    Iterator
  5. def /:[B](z: B)(op: (B, JsonEvent) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  6. def :\[B](z: B)(op: (JsonEvent, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  7. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  9. def addString(b: StringBuilder): StringBuilder

    Definition Classes
    TraversableOnce
  10. def addString(b: StringBuilder, sep: String): StringBuilder

    Definition Classes
    TraversableOnce
  11. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Definition Classes
    TraversableOnce
  12. def aggregate[B](z: B)(seqop: (B, JsonEvent) ⇒ B, combop: (B, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def buffered: JsonEventIterator.this.type

    Definition Classes
    BufferedIterator → Iterator
  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def collect[B](pf: PartialFunction[JsonEvent, B]): Iterator[B]

    Definition Classes
    Iterator
    Annotations
    @migration
    Migration

    (Changed in version 2.8.0) collect has changed. The previous behavior can be reproduced with toSeq.

  17. def collectFirst[B](pf: PartialFunction[JsonEvent, B]): Option[B]

    Definition Classes
    TraversableOnce
  18. def contains(elem: Any): Boolean

    Definition Classes
    Iterator
  19. def copyToArray[B >: JsonEvent](xs: Array[B], start: Int, len: Int): Unit

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  20. def copyToArray[B >: JsonEvent](xs: Array[B]): Unit

    Definition Classes
    TraversableOnce → GenTraversableOnce
  21. def copyToArray[B >: JsonEvent](xs: Array[B], start: Int): Unit

    Definition Classes
    TraversableOnce → GenTraversableOnce
  22. def copyToBuffer[B >: JsonEvent](dest: Buffer[B]): Unit

    Definition Classes
    TraversableOnce
  23. def corresponds[B](that: GenTraversableOnce[B])(p: (JsonEvent, B) ⇒ Boolean): Boolean

    Definition Classes
    Iterator
  24. def count(p: (JsonEvent) ⇒ Boolean): Int

    Definition Classes
    TraversableOnce → GenTraversableOnce
  25. def drop(n: Int): Iterator[JsonEvent]

    Definition Classes
    Iterator
  26. final def dropNextDatum(): JsonEventIterator

    Annotations
    @inline()
  27. final def dropRestOfCompound(): JsonEventIterator

    Annotations
    @inline()
  28. def dropWhile(p: (JsonEvent) ⇒ Boolean): Iterator[JsonEvent]

    Definition Classes
    Iterator
  29. def duplicate: (Iterator[JsonEvent], Iterator[JsonEvent])

    Definition Classes
    Iterator
  30. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  32. def exists(p: (JsonEvent) ⇒ Boolean): Boolean

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  33. def filter(p: (JsonEvent) ⇒ Boolean): Iterator[JsonEvent]

    Definition Classes
    Iterator
  34. def filterNot(p: (JsonEvent) ⇒ Boolean): Iterator[JsonEvent]

    Definition Classes
    Iterator
  35. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. def find(p: (JsonEvent) ⇒ Boolean): Option[JsonEvent]

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  37. def flatMap[B](f: (JsonEvent) ⇒ GenTraversableOnce[B]): Iterator[B]

    Definition Classes
    Iterator
  38. def fold[A1 >: JsonEvent](z: A1)(op: (A1, A1) ⇒ A1): A1

    Definition Classes
    TraversableOnce → GenTraversableOnce
  39. def foldLeft[B](z: B)(op: (B, JsonEvent) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  40. def foldRight[B](z: B)(op: (JsonEvent, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  41. def forall(p: (JsonEvent) ⇒ Boolean): Boolean

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  42. def foreach[U](f: (JsonEvent) ⇒ U): Unit

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  43. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  44. def grouped[B >: JsonEvent](size: Int): GroupedIterator[B]

    Definition Classes
    Iterator
  45. def hasDefiniteSize: Boolean

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  46. def hasNext: Boolean

    Definition Classes
    JsonEventIterator → Iterator
  47. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  48. def head: JsonEvent

    Definition Classes
    JsonEventIterator → BufferedIterator
  49. def indexOf[B >: JsonEvent](elem: B): Int

    Definition Classes
    Iterator
  50. def indexWhere(p: (JsonEvent) ⇒ Boolean): Int

    Definition Classes
    Iterator
  51. def isEmpty: Boolean

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  52. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  53. def isTraversableAgain: Boolean

    Definition Classes
    Iterator → GenTraversableOnce
  54. def length: Int

    Definition Classes
    Iterator
  55. def map[B](f: (JsonEvent) ⇒ B): Iterator[B]

    Definition Classes
    Iterator
  56. def max[B >: JsonEvent](implicit cmp: Ordering[B]): JsonEvent

    Definition Classes
    TraversableOnce → GenTraversableOnce
  57. def maxBy[B](f: (JsonEvent) ⇒ B)(implicit cmp: Ordering[B]): JsonEvent

    Definition Classes
    TraversableOnce → GenTraversableOnce
  58. def min[B >: JsonEvent](implicit cmp: Ordering[B]): JsonEvent

    Definition Classes
    TraversableOnce → GenTraversableOnce
  59. def minBy[B](f: (JsonEvent) ⇒ B)(implicit cmp: Ordering[B]): JsonEvent

    Definition Classes
    TraversableOnce → GenTraversableOnce
  60. def mkString: String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  61. def mkString(sep: String): String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  62. def mkString(start: String, sep: String, end: String): String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  63. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  64. def next(): JsonEvent

    Definition Classes
    JsonEventIterator → Iterator
  65. def nonEmpty: Boolean

    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. final def notify(): Unit

    Definition Classes
    AnyRef
  67. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  68. def padTo[A1 >: JsonEvent](len: Int, elem: A1): Iterator[A1]

    Definition Classes
    Iterator
  69. def partition(p: (JsonEvent) ⇒ Boolean): (Iterator[JsonEvent], Iterator[JsonEvent])

    Definition Classes
    Iterator
  70. def patch[B >: JsonEvent](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]

    Definition Classes
    Iterator
  71. def product[B >: JsonEvent](implicit num: Numeric[B]): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  72. def reduce[A1 >: JsonEvent](op: (A1, A1) ⇒ A1): A1

    Definition Classes
    TraversableOnce → GenTraversableOnce
  73. def reduceLeft[B >: JsonEvent](op: (B, JsonEvent) ⇒ B): B

    Definition Classes
    TraversableOnce
  74. def reduceLeftOption[B >: JsonEvent](op: (B, JsonEvent) ⇒ B): Option[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  75. def reduceOption[A1 >: JsonEvent](op: (A1, A1) ⇒ A1): Option[A1]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  76. def reduceRight[B >: JsonEvent](op: (JsonEvent, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  77. def reduceRightOption[B >: JsonEvent](op: (JsonEvent, B) ⇒ B): Option[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  78. def reversed: List[JsonEvent]

    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  79. def sameElements(that: Iterator[_]): Boolean

    Definition Classes
    Iterator
  80. def scanLeft[B](z: B)(op: (B, JsonEvent) ⇒ B): Iterator[B]

    Definition Classes
    Iterator
  81. def scanRight[B](z: B)(op: (JsonEvent, B) ⇒ B): Iterator[B]

    Definition Classes
    Iterator
  82. def seq: Iterator[JsonEvent]

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  83. def size: Int

    Definition Classes
    TraversableOnce → GenTraversableOnce
  84. def skipNextDatum(): JsonEventIterator.this.type

    Skips the next datum that would be returned entirely.

    Skips the next datum that would be returned entirely. If the next event is the start of a array or object, skipRestOfCompound() is called to pass over it. If it's a field event, the field and its associated value are skipped. If it's the end of a array or object, no position change is made and the next call to head or next() will still return the end event. Otherwise, it's an atom and is consumed.

    returns

    This iterator

    Exceptions thrown
    JsonEOF

    if the token iterator runs out before the end of the datum

    NoSuchElementException

    if this iterator is empty at the start of the call

  85. def skipRestOfCompound(): JsonEventIterator.this.type

    Finish reading the "current" object or array, where "current" is defined as "the most recent compound object started by next().

    Finish reading the "current" object or array, where "current" is defined as "the most recent compound object started by next(). If a top-level object has not been started, this does nothing.

    returns

    This iterator

    Exceptions thrown
    JsonEOF

    If the end-of-input occurs before finishing this object.

  86. def slice(from: Int, until: Int): Iterator[JsonEvent]

    Definition Classes
    Iterator
  87. def sliding[B >: JsonEvent](size: Int, step: Int): GroupedIterator[B]

    Definition Classes
    Iterator
  88. def span(p: (JsonEvent) ⇒ Boolean): (Iterator[JsonEvent], Iterator[JsonEvent])

    Definition Classes
    Iterator
  89. def sum[B >: JsonEvent](implicit num: Numeric[B]): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  90. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  91. def take(n: Int): Iterator[JsonEvent]

    Definition Classes
    Iterator
  92. def takeWhile(p: (JsonEvent) ⇒ Boolean): Iterator[JsonEvent]

    Definition Classes
    Iterator
  93. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, JsonEvent, Col[JsonEvent]]): Col[JsonEvent]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  94. def toArray[B >: JsonEvent](implicit arg0: ClassTag[B]): Array[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  95. def toBuffer[B >: JsonEvent]: Buffer[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  96. def toIndexedSeq: IndexedSeq[JsonEvent]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  97. def toIterable: Iterable[JsonEvent]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  98. def toIterator: Iterator[JsonEvent]

    Definition Classes
    Iterator → GenTraversableOnce
  99. def toList: List[JsonEvent]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  100. def toMap[T, U](implicit ev: <:<[JsonEvent, (T, U)]): Map[T, U]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  101. def toSeq: Seq[JsonEvent]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  102. def toSet[B >: JsonEvent]: Set[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  103. def toStream: Stream[JsonEvent]

    Definition Classes
    Iterator → GenTraversableOnce
  104. def toString(): String

    Definition Classes
    JsonEventIterator → Iterator → AnyRef → Any
  105. def toTraversable: Traversable[JsonEvent]

    Definition Classes
    Iterator → TraversableOnce → GenTraversableOnce
  106. def toVector: Vector[JsonEvent]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  107. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  109. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  110. def withFilter(p: (JsonEvent) ⇒ Boolean): Iterator[JsonEvent]

    Definition Classes
    Iterator
  111. def zip[B](that: Iterator[B]): Iterator[(JsonEvent, B)]

    Definition Classes
    Iterator
  112. def zipAll[B, A1 >: JsonEvent, B1 >: B](that: Iterator[B], thisElem: A1, thatElem: B1): Iterator[(A1, B1)]

    Definition Classes
    Iterator
  113. def zipWithIndex: Iterator[(JsonEvent, Int)]

    Definition Classes
    Iterator

Deprecated Value Members

  1. def /:\[A1 >: JsonEvent](z: A1)(op: (A1, A1) ⇒ A1): A1

    Definition Classes
    GenTraversableOnce
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) use fold instead

Inherited from BufferedIterator[JsonEvent]

Inherited from AbstractIterator[JsonEvent]

Inherited from Iterator[JsonEvent]

Inherited from TraversableOnce[JsonEvent]

Inherited from GenTraversableOnce[JsonEvent]

Inherited from AnyRef

Inherited from Any

Ungrouped