Trait

ujson

Visitor

Related Doc: package ujson

Permalink

trait Visitor[-T, +J] extends AnyRef

Visitor is a type class that describes how ujson should visit json elements.

Visitors return their results type as J which may be an AST, e.g. AstTransformer, or a writer-like type that Visitors apply side-effects to, e.g. StringRenderer, BytesRenderer.

T

???

J

the result of visiting elements (e.g. a json AST or side-effecting writer)

See also

http://www.lihaoyi.com/post/ZeroOverheadTreeProcessingwiththeVisitorPattern.html

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Visitor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def visitArray(index: Int): ArrVisitor[T, J]

    Permalink

    index

    json source position at the start of the [ being visited

    returns

    a Visitor used for visiting the elements of the array

  2. abstract def visitFalse(index: Int): J

    Permalink

    index

    json source position at the start of the false being visited

  3. abstract def visitNull(index: Int): J

    Permalink

    index

    json source position at the start of the null being visited

  4. abstract def visitNum(s: CharSequence, decIndex: Int, expIndex: Int, index: Int): J

    Permalink

    Visit the number in its text representation.

    Visit the number in its text representation.

    s

    unparsed text representation of the number.

    decIndex

    index of the ., relative to the start of the CharSequence, or -1 if omitted

    expIndex

    index of e or E relative to the start of the CharSequence, or -1 if omitted

    index

    json source position at the start of the number being visited

    See also

    Js.visitNum() for an example of parsing into numeric types

  5. abstract def visitObject(index: Int): ObjVisitor[T, J]

    Permalink

    index

    json source position at the start of the { being visited

    returns

    a ObjVisitor used for visiting the keys/values of the object

  6. abstract def visitString(s: CharSequence, index: Int): J

    Permalink

    s

    the text string being visited

    index

    json source position at the start of the string being visited

  7. abstract def visitTrue(index: Int): J

    Permalink

    index

    json source position at the start of the true being visited

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(t: Transformable): J

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  18. def visitArray(): ArrVisitor[T, J]

    Permalink

    Version of visitArray() without source index information.

    Version of visitArray() without source index information.

    returns

    a Visitor used for visiting the elements of the array

  19. def visitFalse(): J

    Permalink
  20. def visitNull(): J

    Permalink
  21. def visitNum(s: CharSequence, decIndex: Int, expIndex: Int): J

    Permalink

    Visit the number in its text representation, without source index information.

    Visit the number in its text representation, without source index information.

    s

    unparsed text representation of the number.

    decIndex

    index of the ., relative to the start of the CharSequence, or -1 if omitted

    expIndex

    index of e or E relative to the start of the CharSequence, or -1 if omitted

    See also

    Js.visitNum() for an example of parsing into numeric types

  22. def visitNumRaw(d: Double, index: Int): J

    Permalink

    Optional handler for raw double values; can be overriden for performance in cases where you're translating directly between numbers to avoid the overhead of stringifying and re-parsing your numbers (e.g.

    Optional handler for raw double values; can be overriden for performance in cases where you're translating directly between numbers to avoid the overhead of stringifying and re-parsing your numbers (e.g. the WebJson transformer gets raw doubles from the underlying Json.parse).

    Delegates to visitNum if not overriden

    Unused by raw json parsers such as ByteBasedParser or CharBasedParser.

    d

    the input number

    index

    json source position at the start of the number being visited

  23. def visitNumRawString(s: String, index: Int): J

    Permalink

    Convenience methods to help you compute the decimal-point-index and exponent-index of an arbitrary numeric string

    Convenience methods to help you compute the decimal-point-index and exponent-index of an arbitrary numeric string

    s

    the text string being visited

    index

    json source position at the start of the string being visited

  24. def visitObject(): ObjVisitor[T, J]

    Permalink

    returns

    a ObjVisitor used for visiting the keys/values of the object

  25. def visitString(s: CharSequence): J

    Permalink

    s

    the text string being visited

  26. def visitTrue(): J

    Permalink
  27. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped