package json
This package is meant to give you a rought equivalent experience to using the intented "busymachines-commons-json" module. Therefore, type alias are the same in both modules, but here they are mapped approximately to spray versions (ObjectEncoder is not quite the same as RootJsonFormat), but for most practical purposes it will work.
- Since
10 Aug 2017
- Alphabetic
- By Inheritance
- json
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- trait AnomalyJsonCodec extends AnyRef
-
trait
BusymachinesDefaultJsonCodec extends FailureMessageJsonCodec with BasicFormats with AdditionalFormats with StandardFormats with CollectionFormats
This trait excludes the spray.json.ProductFormats on purpose, because there should be only one way to derive a formatter is through the
objectderive
This trait excludes the spray.json.ProductFormats on purpose, because there should be only one way to derive a formatter is through the
objectderive
- Since
26 Oct 2017
-
type
Codec[A] = RootJsonFormat[A]
Since Codec is the desired type signature when using derivation if we want to keep it syntactically consistent with the other json module, then we have no choice but to sacrifice a bit of semantic sense (for this particular case) for the greater good.
- type Decoder[A] = RootJsonReader[A]
- type Encoder[A] = RootJsonWriter[A]
- trait FailureMessageJsonCodec extends AnyRef
- type Json = JsValue
- final case class JsonDecodingFailure(msg: String) extends InvalidInputFailure with Product with Serializable
- type JsonObject = JsObject
- final case class JsonParsingFailure(msg: String) extends InvalidInputFailure with Product with Serializable
-
trait
JsonSyntax extends AnyRef
- Since
19 Oct 2017
- type ValueCodec[A] = JsonFormat[A]
- type ValueDecoder[A] = JsonReader[A]
- type ValueEncoder[A] = JsonWriter[A]
Value Members
- val JsonObject: JsObject.type
- final val ValueDecoder: JsonReader.type
- final val ValueEncoder: JsonWriter.type
-
object
AnomalyJsonCodec extends AnomalyJsonCodec
- Since
26 Dec 2017
-
object
FailureMessageJsonCodec extends FailureMessageJsonCodec
- Since
10 Aug 2017
- object JsonAnomalyIDs
-
object
JsonDecoding
- Since
10 Aug 2017
-
object
JsonParsing
- Since
10 Aug 2017
- object PrettyJson
-
object
syntax extends JsonSyntax
This file exists for two reasons: 1) - didn't want to have the library depend too much on package objects 2) - out of the blue we started getting the following compiler error in client code
This file exists for two reasons: 1) - didn't want to have the library depend too much on package objects 2) - out of the blue we started getting the following compiler error in client code
Error:(20, 11) package cats contains object and package with same name: implicits one of them needs to be removed from classpath c.as[String].right.map(FailureID.apply)
Therefore "package-like" imports are modeled as much as possible as static imports of the properties in a simple object
- Since
19 Oct 2017