Use a custom typeclass to describe values which can appear on the wire

These are ToRSON / FromRSON, symmetric to ToJSON / FromJSON. In fact, most
implementations are equivalent. But for certain types (such as Time) they
differ.
Add Time type (implemented using ZonedTime)