besom.json

package besom.json

Members list

Type members

Classlikes

Provides additional JsonFormats and helpers

Provides additional JsonFormats and helpers

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait BasicFormats

Provides the JsonFormats for the most important Scala types.

Provides the JsonFormats for the most important Scala types.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait CompactPrinter extends JsonPrinter

A JsonPrinter that produces compact JSON source without any superfluous whitespace.

A JsonPrinter that produces compact JSON source without any superfluous whitespace.

Attributes

Companion
object
Supertypes
trait JsonPrinter
trait JsValue => String
class Object
trait Matchable
class Any
Known subtypes
object CompactPrinter.type

Attributes

Companion
trait
Supertypes
trait JsonPrinter
trait JsValue => String
class Object
trait Matchable
class Any
Show all
Self type

Provides all the predefined JsonFormats.

Provides all the predefined JsonFormats.

Attributes

Companion
object
Supertypes
trait JsonProtocol
trait BasicFormats
class Object
trait Matchable
class Any
Show all
Known subtypes
object DefaultJsonProtocol.type

Attributes

Companion
trait
Supertypes
trait JsonProtocol
trait BasicFormats
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class JsArray(elements: Vector[JsValue]) extends JsValue

A JSON array.

A JSON array.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class JsValue
class Object
trait Matchable
class Any
Show all
object JsArray

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
JsArray.type
sealed abstract class JsBoolean extends JsValue

JSON Booleans.

JSON Booleans.

Attributes

Companion
object
Supertypes
class JsValue
class Object
trait Matchable
class Any
Known subtypes
object JsFalse.type
object JsTrue.type
object JsBoolean

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
JsBoolean.type
case object JsFalse extends JsBoolean

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class JsBoolean
class JsValue
class Object
trait Matchable
class Any
Show all
Self type
JsFalse.type
case object JsNull extends JsValue

The representation for JSON null.

The representation for JSON null.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class JsValue
class Object
trait Matchable
class Any
Show all
Self type
JsNull.type
case class JsNumber(value: BigDecimal) extends JsValue

A JSON number.

A JSON number.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class JsValue
class Object
trait Matchable
class Any
Show all
object JsNumber

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
JsNumber.type
case class JsObject(fields: Map[String, JsValue]) extends JsValue

A JSON object.

A JSON object.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class JsValue
class Object
trait Matchable
class Any
Show all
object JsObject

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
JsObject.type
case class JsString(value: String) extends JsValue

A JSON string.

A JSON string.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class JsValue
class Object
trait Matchable
class Any
Show all
object JsString

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
JsString.type
case object JsTrue extends JsBoolean

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class JsBoolean
class JsValue
class Object
trait Matchable
class Any
Show all
Self type
JsTrue.type
sealed abstract class JsValue

The general type of a JSON AST node.

The general type of a JSON AST node.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class JsArray
class JsBoolean
object JsFalse.type
object JsTrue.type
object JsNull.type
class JsNumber
class JsObject
class JsString
Show all
trait JsonFormat[T] extends JsonReader[T], JsonWriter[T]

Provides the JSON deserialization and serialization for type T.

Provides the JSON deserialization and serialization for type T.

Attributes

Companion
object
Supertypes
trait JsonWriter[T]
trait JsonReader[T]
class Object
trait Matchable
class Any
Known subtypes
object JsValueFormat.type
object BigDecimalJsonFormat.type
object BigIntJsonFormat.type
object BooleanJsonFormat.type
object ByteJsonFormat.type
object CharJsonFormat.type
object DoubleJsonFormat.type
object FloatJsonFormat.type
object IntJsonFormat.type
object LongJsonFormat.type
object ShortJsonFormat.type
object StringJsonFormat.type
object SymbolJsonFormat.type
object UnitJsonFormat.type
class OptionFormat[T]
trait RootJsonFormat[T]
object RootJsArrayFormat.type
object RootJsObjectFormat.type
Show all
object JsonFormat

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
JsonFormat.type
object JsonParser

Fast, no-dependency parser for JSON as defined by http://tools.ietf.org/html/rfc4627.

Fast, no-dependency parser for JSON as defined by http://tools.ietf.org/html/rfc4627.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
JsonParser.type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
sealed trait JsonParserSettings

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)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait JsonPrinter extends JsValue => String

A JsonPrinter serializes a JSON AST to a String.

A JsonPrinter serializes a JSON AST to a String.

Attributes

Companion
object
Supertypes
trait JsValue => String
class Object
trait Matchable
class Any
Known subtypes
object CompactPrinter.type
object PrettyPrinter.type
object SortedPrinter.type
Show all
object JsonPrinter

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait BasicFormats
class Object
trait Matchable
class Any
Show all
Known subtypes
trait JsonReader[T]

Provides the JSON deserialization for type T.

Provides the JSON deserialization for type T.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait JsonFormat[T]
object JsValueFormat.type
object BigDecimalJsonFormat.type
object BigIntJsonFormat.type
object BooleanJsonFormat.type
object ByteJsonFormat.type
object CharJsonFormat.type
object DoubleJsonFormat.type
object FloatJsonFormat.type
object IntJsonFormat.type
object LongJsonFormat.type
object ShortJsonFormat.type
object StringJsonFormat.type
object SymbolJsonFormat.type
object UnitJsonFormat.type
class OptionFormat[T]
trait RootJsonFormat[T]
object RootJsArrayFormat.type
object RootJsObjectFormat.type
trait RootJsonReader[T]
Show all
object JsonReader

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
JsonReader.type
trait JsonWriter[T]

Provides the JSON serialization for type T.

Provides the JSON serialization for type T.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait JsonFormat[T]
object JsValueFormat.type
object BigDecimalJsonFormat.type
object BigIntJsonFormat.type
object BooleanJsonFormat.type
object ByteJsonFormat.type
object CharJsonFormat.type
object DoubleJsonFormat.type
object FloatJsonFormat.type
object IntJsonFormat.type
object LongJsonFormat.type
object ShortJsonFormat.type
object StringJsonFormat.type
object SymbolJsonFormat.type
object UnitJsonFormat.type
class OptionFormat[T]
trait RootJsonFormat[T]
object RootJsArrayFormat.type
object RootJsObjectFormat.type
trait RootJsonWriter[T]
Show all
object JsonWriter

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
JsonWriter.type
trait NullOptions extends ProductFormats

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 as null. (Note that this only affect JSON writing, besom-json will always read missing optional members as well as null optional members as None.)

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 as null. (Note that this only affect JSON writing, besom-json will always read missing optional members as well as null optional members as None.)

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait ParserInput

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ParserInput

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait PrettyPrinter extends JsonPrinter

A JsonPrinter that produces a nicely readable JSON source.

A JsonPrinter that produces a nicely readable JSON source.

Attributes

Companion
object
Supertypes
trait JsonPrinter
trait JsValue => String
class Object
trait Matchable
class Any
Known subtypes
object PrettyPrinter.type
object SortedPrinter.type
object PrettyPrinter extends PrettyPrinter

Attributes

Companion
trait
Supertypes
trait JsonPrinter
trait JsValue => String
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

A special JsonFormat signaling that the format produces a legal JSON root object, i.e. either a JSON array or a JSON object.

A special JsonFormat signaling that the format produces a legal JSON root object, i.e. either a JSON array or a JSON object.

Attributes

Supertypes
trait RootJsonWriter[T]
trait RootJsonReader[T]
trait JsonFormat[T]
trait JsonWriter[T]
trait JsonReader[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
object RootJsArrayFormat.type
object RootJsObjectFormat.type
trait RootJsonReader[T] extends JsonReader[T]

A special JsonReader capable of reading a legal JSON root object, i.e. either a JSON array or a JSON object.

A special JsonReader capable of reading a legal JSON root object, i.e. either a JSON array or a JSON object.

Attributes

Supertypes
trait JsonReader[T]
class Object
trait Matchable
class Any
Known subtypes
trait RootJsonFormat[T]
object RootJsArrayFormat.type
object RootJsObjectFormat.type
trait RootJsonWriter[T] extends JsonWriter[T]

A special JsonWriter capable of writing a legal JSON root object, i.e. either a JSON array or a JSON object.

A special JsonWriter capable of writing a legal JSON root object, i.e. either a JSON array or a JSON object.

Attributes

Supertypes
trait JsonWriter[T]
class Object
trait Matchable
class Any
Known subtypes
trait RootJsonFormat[T]
object RootJsArrayFormat.type
object RootJsObjectFormat.type

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
object
Supertypes
trait JsonPrinter
trait JsValue => String
class Object
trait Matchable
class Any
Show all
Known subtypes
object SortedPrinter.type
object SortedPrinter extends SortedPrinter

Attributes

Companion
trait
Supertypes
trait JsonPrinter
trait JsValue => String
class Object
trait Matchable
class Any
Show all
Self type

Provides the JsonFormats for the non-collection standard types.

Provides the JsonFormats for the non-collection standard types.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type

Types

type JsField = (String, JsValue)

Value members

Concrete methods

def jsonReader[T](implicit reader: JsonReader[T]): JsonReader[T]
def jsonWriter[T](implicit writer: JsonWriter[T]): JsonWriter[T]
def serializationError(msg: String): Nothing

Implicits

Implicits

implicit def enrichAny[T](any: T): RichAny[T]
implicit def enrichString(string: String): RichString