Packages

final case class Printer(dropNullValues: Boolean, indent: String, lbraceLeft: String = "", lbraceRight: String = "", rbraceLeft: String = "", rbraceRight: String = "", lbracketLeft: String = "", lbracketRight: String = "", rbracketLeft: String = "", rbracketRight: String = "", lrbracketsEmpty: String = "", arrayCommaLeft: String = "", arrayCommaRight: String = "", objectCommaLeft: String = "", objectCommaRight: String = "", colonLeft: String = "", colonRight: String = "", reuseWriters: Boolean = false, predictSize: Boolean = false, escapeNonAscii: Boolean = false, sortKeys: Boolean = false) extends Product with Serializable

A pretty-printer for JSON values.

dropNullValues

Determines if object fields with values of null are dropped from the output.

indent

The indentation to use if any format strings contain a new line.

lbraceLeft

Spaces to insert to left of a left brace.

lbraceRight

Spaces to insert to right of a left brace.

rbraceLeft

Spaces to insert to left of a right brace.

rbraceRight

Spaces to insert to right of a right brace.

lbracketLeft

Spaces to insert to left of a left bracket.

lbracketRight

Spaces to insert to right of a left bracket.

rbracketLeft

Spaces to insert to left of a right bracket.

rbracketRight

Spaces to insert to right of a right bracket.

lrbracketsEmpty

Spaces to insert for an empty array.

arrayCommaLeft

Spaces to insert to left of a comma in an array.

arrayCommaRight

Spaces to insert to right of a comma in an array.

objectCommaLeft

Spaces to insert to left of a comma in an object.

objectCommaRight

Spaces to insert to right of a comma in an object.

colonLeft

Spaces to insert to left of a colon.

colonRight

Spaces to insert to right of a colon.

reuseWriters

Determines whether the printer will reuse Appendables via thread-local storage.

predictSize

Uses an adaptive size predictor to avoid grow-and-copy steps while printing into a binary output.

escapeNonAscii

Unicode-escape any non-ASCII characters in strings.

sortKeys

Determines whether the fields should be sorted.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Printer
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Printer(dropNullValues: Boolean, indent: String, lbraceLeft: String = "", lbraceRight: String = "", rbraceLeft: String = "", rbraceRight: String = "", lbracketLeft: String = "", lbracketRight: String = "", rbracketLeft: String = "", rbracketRight: String = "", lrbracketsEmpty: String = "", arrayCommaLeft: String = "", arrayCommaRight: String = "", objectCommaLeft: String = "", objectCommaRight: String = "", colonLeft: String = "", colonRight: String = "", reuseWriters: Boolean = false, predictSize: Boolean = false, escapeNonAscii: Boolean = false, sortKeys: Boolean = false)

    dropNullValues

    Determines if object fields with values of null are dropped from the output.

    indent

    The indentation to use if any format strings contain a new line.

    lbraceLeft

    Spaces to insert to left of a left brace.

    lbraceRight

    Spaces to insert to right of a left brace.

    rbraceLeft

    Spaces to insert to left of a right brace.

    rbraceRight

    Spaces to insert to right of a right brace.

    lbracketLeft

    Spaces to insert to left of a left bracket.

    lbracketRight

    Spaces to insert to right of a left bracket.

    rbracketLeft

    Spaces to insert to left of a right bracket.

    rbracketRight

    Spaces to insert to right of a right bracket.

    lrbracketsEmpty

    Spaces to insert for an empty array.

    arrayCommaLeft

    Spaces to insert to left of a comma in an array.

    arrayCommaRight

    Spaces to insert to right of a comma in an array.

    objectCommaLeft

    Spaces to insert to left of a comma in an object.

    objectCommaRight

    Spaces to insert to right of a comma in an object.

    colonLeft

    Spaces to insert to left of a colon.

    colonRight

    Spaces to insert to right of a colon.

    reuseWriters

    Determines whether the printer will reuse Appendables via thread-local storage.

    predictSize

    Uses an adaptive size predictor to avoid grow-and-copy steps while printing into a binary output.

    escapeNonAscii

    Unicode-escape any non-ASCII characters in strings.

    sortKeys

    Determines whether the fields should be sorted.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val arrayCommaLeft: String
  5. val arrayCommaRight: String
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val colonLeft: String
  9. val colonRight: String
  10. val dropNullValues: Boolean
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. val escapeNonAscii: Boolean
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. val indent: String
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val lbraceLeft: String
  18. val lbraceRight: String
  19. val lbracketLeft: String
  20. val lbracketRight: String
  21. val lrbracketsEmpty: String
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. val objectCommaLeft: String
  26. val objectCommaRight: String
  27. val predictSize: Boolean
  28. final def print(json: Json): String

    Returns a string representation of a pretty-printed JSON value.

  29. final def printToByteBuffer(json: Json): ByteBuffer
  30. final def printToByteBuffer(json: Json, cs: Charset): ByteBuffer
  31. val rbraceLeft: String
  32. val rbraceRight: String
  33. val rbracketLeft: String
  34. val rbracketRight: String
  35. val reuseWriters: Boolean
  36. val sortKeys: Boolean
  37. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def withSortedKeys: Printer

    The same pretty-printer configuration that outputs fields in sorted order.

Deprecated Value Members

  1. final def pretty(json: Json): String

    Returns a string representation of a pretty-printed JSON value.

    Returns a string representation of a pretty-printed JSON value.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use print

  2. final def prettyByteBuffer(json: Json): ByteBuffer
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use printToByteBuffer

  3. final def prettyByteBuffer(json: Json, cs: Charset): ByteBuffer
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use printToByteBuffer

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped