io.eezo.json.upickle
Members list
Givens
Givens
A key crosses the wire as the text io.eezo.core.Id.show gives, the same text it has in a path and in a form, so a client can put the id it read from one response into the URL of the next with nothing to translate.
A key crosses the wire as the text io.eezo.core.Id.show gives, the same text it has in a path and in a form, so a client can put the id it read from one response into the URL of the next with nothing to translate.
Attributes
- Source
- UpickleSerde.scala
The io.eezo.http.api.Serde of any model, through upickle.
The io.eezo.http.api.Serde of any model, through upickle.
The author's own ReadWriter wins when one is in scope, so a model that already crosses the wire in a shape of its own keeps it; otherwise a case class has one derived, so a flat model needs no derives clause to be a payload. Derivation reaches no further than that one case class: each of its fields needs a ReadWriter of its own, and so does the model when it sits inside a List or an Option. Only a case class is derived because List and Option are sums of the standard library too, and deriving them would end in an error about :: or Some rather than the collection the author wrote; anything else is asked for as an instance, so the compiler's message names the type at the summon site. Inline because both questions can only be asked where the model is known: neither the instance nor the Mirror and ClassTag derivation needs resolves for an abstract A.
Imported, so it sits in the caller's lexical scope and is found before any Serde in a model's companion. An application that writes its own Serde for one model brings it into scope at a nearer level than this import for it to win.
Attributes
- Source
- UpickleSerde.scala