Implemented typeclass pattern Reads[A] and Writes[A].