package json
- Alphabetic
- By Inheritance
- json
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
AdditionalFormats extends AnyRef
Provides additional JsonFormats and helpers
-
trait
BasicFormats extends AnyRef
Provides the JsonFormats for the most important Scala types.
- trait CollectionFormats extends AnyRef
-
trait
CompactPrinter extends JsonPrinter
A JsonPrinter that produces compact JSON source without any superfluous whitespace.
-
trait
DefaultJsonProtocol extends BasicFormats with StandardFormats with CollectionFormats with ProductFormats with AdditionalFormats
Provides all the predefined JsonFormats.
- case class DeserializationException(msg: String, cause: Throwable = null, fieldNames: List[String] = Nil) extends RuntimeException with Product with Serializable
-
case class
JsArray(elements: Vector[JsValue]) extends JsValue with Product with Serializable
A JSON array.
-
sealed abstract
class
JsBoolean extends JsValue
JSON Booleans.
- type JsField = (String, JsValue)
-
case class
JsNumber(value: BigDecimal) extends JsValue with Product with Serializable
A JSON number.
-
case class
JsObject(fields: Map[String, JsValue]) extends JsValue with Product with Serializable
A JSON object.
-
case class
JsString(value: String) extends JsValue with Product with Serializable
A JSON string.
-
sealed abstract
class
JsValue extends AnyRef
The general type of a JSON AST node.
-
trait
JsonFormat[T] extends JsonReader[T] with JsonWriter[T]
Provides the JSON deserialization and serialization for type T.
- class JsonParser extends AnyRef
-
sealed
trait
JsonParserSettings extends AnyRef
Allows to customize settings for the JSON parser.
Allows to customize settings for the JSON parser.
Use it like this:
val customSettings = JsonParserSettings.default .withMaxDepth(100) .withMaxNumberCharacters(20)
JsonParser(jsonString, customSettings) // or jsonString.parseJson(customSettings)
-
trait
JsonPrinter extends (JsValue) ⇒ String
A JsonPrinter serializes a JSON AST to a String.
-
trait
JsonReader[T] extends AnyRef
Provides the JSON deserialization for type T.
Provides the JSON deserialization for type T.
- Annotations
- @implicitNotFound( ... )
-
trait
JsonWriter[T] extends AnyRef
Provides the JSON serialization for type T.
Provides the JSON serialization for type T.
- Annotations
- @implicitNotFound( ... )
-
trait
NullOptions extends ProductFormats
This trait supplies an alternative rendering mode for optional case class members.
This trait supplies an alternative rendering mode for optional case class members. Normally optional members that are undefined (
None
) are not rendered at all. By mixing in this trait into your custom JsonProtocol you can enforce the rendering of undefined members asnull
. (Note that this only affect JSON writing, spray-json will always read missing optional members as well asnull
optional members asNone
.) - trait ParserInput extends AnyRef
-
trait
PrettyPrinter extends JsonPrinter
A JsonPrinter that produces a nicely readable JSON source.
-
trait
ProductFormats extends ProductFormatsInstances
Provides the helpers for constructing custom JsonFormat implementations for types implementing the Product trait (especially case classes)
- trait ProductFormatsInstances extends AnyRef
-
trait
RootJsonFormat[T] extends JsonFormat[T] with RootJsonReader[T] with RootJsonWriter[T]
A special JsonFormat signaling that the format produces a legal JSON root object, i.e.
A special JsonFormat signaling that the format produces a legal JSON root object, i.e. either a JSON array or a JSON object.
-
trait
RootJsonReader[T] extends JsonReader[T]
A special JsonReader capable of reading a legal JSON root object, i.e.
A special JsonReader capable of reading a legal JSON root object, i.e. either a JSON array or a JSON object.
- Annotations
- @implicitNotFound( ... )
-
trait
RootJsonWriter[T] extends JsonWriter[T]
A special JsonWriter capable of writing a legal JSON root object, i.e.
A special JsonWriter capable of writing a legal JSON root object, i.e. either a JSON array or a JSON object.
- Annotations
- @implicitNotFound( ... )
- class SerializationException extends RuntimeException
- trait SortedPrinter extends PrettyPrinter
-
trait
StandardFormats extends AnyRef
Provides the JsonFormats for the non-collection standard types.
Value Members
- def deserializationError(msg: String, cause: Throwable = null, fieldNames: List[String] = Nil): Nothing
- implicit def enrichAny[T](any: T): RichAny[T]
- implicit def enrichString(string: String): RichString
- def jsonReader[T](implicit reader: JsonReader[T]): JsonReader[T]
- def jsonWriter[T](implicit writer: JsonWriter[T]): JsonWriter[T]
- def serializationError(msg: String): Nothing
- object CompactPrinter extends CompactPrinter
- object DefaultJsonProtocol extends DefaultJsonProtocol
- object JsArray extends Serializable
- object JsBoolean
- object JsFalse extends JsBoolean with Product with Serializable
-
object
JsNull extends JsValue with Product with Serializable
The representation for JSON null.
- object JsNumber extends Serializable
- object JsObject extends Serializable
- object JsString extends Serializable
- object JsTrue extends JsBoolean with Product with Serializable
-
object
JsonParser
Fast, no-dependency parser for JSON as defined by http://tools.ietf.org/html/rfc4627.
- object JsonParserSettings
- object JsonPrinter
- object JsonReader
- object JsonWriter
- object ParserInput
- object PrettyPrinter extends PrettyPrinter
- object ProductFormats
- object SortedPrinter extends SortedPrinter