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
- Alphabetic
- By Inheritance
- Printer
- Serializable
- Product
- Equals
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Printer, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val arrayCommaLeft: String
- val arrayCommaRight: String
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val colonLeft: String
- val colonRight: String
- val dropNullValues: Boolean
- def ensuring(cond: (Printer) => Boolean, msg: => Any): Printer
- def ensuring(cond: (Printer) => Boolean): Printer
- def ensuring(cond: Boolean, msg: => Any): Printer
- def ensuring(cond: Boolean): Printer
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val escapeNonAscii: Boolean
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def formatted(fmtstr: String): String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val indent: String
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val lbraceLeft: String
- val lbraceRight: String
- val lbracketLeft: String
- val lbracketRight: String
- val lrbracketsEmpty: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val objectCommaLeft: String
- val objectCommaRight: String
- val predictSize: Boolean
- final def print(json: Json): String
Returns a string representation of a pretty-printed JSON value.
- final def printToByteBuffer(json: Json): ByteBuffer
- final def printToByteBuffer(json: Json, cs: Charset): ByteBuffer
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val rbraceLeft: String
- val rbraceRight: String
- val rbracketLeft: String
- val rbracketRight: String
- val reuseWriters: Boolean
- val sortKeys: Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def withSortedKeys: Printer
The same pretty-printer configuration that outputs fields in sorted order.
Deprecated Value Members
- 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.