Builder

class Builder[J](facade: BuilderFacade[J])

Builder is an mutable structure to write JSON into.

class Object
trait Matchable
class Any

Value members

Concrete methods

def addField[A](field: String, a: A)(implicit writer: JsonWriter[A]): Unit
def addFieldName(field: String): Unit

Write field name to the current context.

Write field name to the current context.

def beginArray(): Unit

Begins JArray. The builder state will be in BuilderState.InContext. Make writeXXX calls to write into this array, and end with endArray.

Begins JArray. The builder state will be in BuilderState.InContext. Make writeXXX calls to write into this array, and end with endArray.

def beginObject(): Unit

Begins JObject. The builder state will be in BuilderState.InObject. Make pairs addField("abc") and writeXXX calls to make field entries, and end with endObject.

Begins JObject. The builder state will be in BuilderState.InObject. Make pairs addField("abc") and writeXXX calls to make field entries, and end with endObject.

def beginPreObject(): Unit

Begins an offline JObject, which will later be used for beginObject(). The builder state will be in BuilderState.InObject. Make pairs addField("abc") and writeXXX calls to make field entries, and end with endObject.

Begins an offline JObject, which will later be used for beginObject(). The builder state will be in BuilderState.InObject. Make pairs addField("abc") and writeXXX calls to make field entries, and end with endObject.

def endArray(): Unit

Ends the current array context.

Ends the current array context.

def endObject(): Unit

Ends the current object context.

Ends the current object context.

def endPreObject(): Unit

Ends the current object context.

Ends the current object context.

def isInObject: Boolean

Checks if the current state is InObject

Checks if the current state is InObject

def result: Option[J]
def writeBigDecimal(x: BigDecimal): Unit

Write BigDecimal value to the current context.

Write BigDecimal value to the current context.

def writeBoolean(x: Boolean): Unit

Write Boolean value to the current context.

Write Boolean value to the current context.

def writeDouble(x: Double): Unit

Write Double value to the current context.

Write Double value to the current context.

def writeInt(x: Int): Unit

Write Int value to the current context.

Write Int value to the current context.

def writeLong(x: Long): Unit

Write Long value to the current context.

Write Long value to the current context.

def writeNull(): Unit

Write null to the current context.

Write null to the current context.

def writeString(x: String): Unit

Write String value to the current context.

Write String value to the current context.