Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- implicit object DurationFormat extends JsonFormat[Duration] {
- def write(obj: Duration): JsValue = JsString(obj.toString)
- def read(json: JsValue): Duration = json match {
- case JsString(x) => Duration.parse(x);
- case _ => deserializationError("Expected UUID as JsString")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement