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.

Source
Printer.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Printer
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Printer toany2stringadd[Printer] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Printer, B)
    Implicit
    This member is added by an implicit conversion from Printer toArrowAssoc[Printer] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. val arrayCommaLeft: String
  7. val arrayCommaRight: String
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. val colonLeft: String
  11. val colonRight: String
  12. val dropNullValues: Boolean
  13. def ensuring(cond: (Printer) => Boolean, msg: => Any): Printer
    Implicit
    This member is added by an implicit conversion from Printer toEnsuring[Printer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: (Printer) => Boolean): Printer
    Implicit
    This member is added by an implicit conversion from Printer toEnsuring[Printer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean, msg: => Any): Printer
    Implicit
    This member is added by an implicit conversion from Printer toEnsuring[Printer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean): Printer
    Implicit
    This member is added by an implicit conversion from Printer toEnsuring[Printer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. val escapeNonAscii: Boolean
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  20. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Printer toStringFormat[Printer] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. val indent: String
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. val lbraceLeft: String
  25. val lbraceRight: String
  26. val lbracketLeft: String
  27. val lbracketRight: String
  28. val lrbracketsEmpty: String
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. val objectCommaLeft: String
  33. val objectCommaRight: String
  34. val predictSize: Boolean
  35. final def print(json: Json): String

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

  36. final def printToByteBuffer(json: Json): ByteBuffer
  37. final def printToByteBuffer(json: Json, cs: Charset): ByteBuffer
  38. def productElementNames: Iterator[String]
    Definition Classes
    Product
  39. val rbraceLeft: String
  40. val rbraceRight: String
  41. val rbracketLeft: String
  42. val rbracketRight: String
  43. val reuseWriters: Boolean
  44. val sortKeys: Boolean
  45. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  49. final def withSortedKeys: Printer

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

Deprecated Value Members

  1. def [B](y: B): (Printer, B)
    Implicit
    This member is added by an implicit conversion from Printer toArrowAssoc[Printer] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromPrinter to any2stringadd[Printer]

Inherited by implicit conversion StringFormat fromPrinter to StringFormat[Printer]

Inherited by implicit conversion Ensuring fromPrinter to Ensuring[Printer]

Inherited by implicit conversion ArrowAssoc fromPrinter to ArrowAssoc[Printer]

Ungrouped