ToJSON :: Options -- ^ Encoding options.
         -> Name -- ^ Name of the type to encode.
         -> Q Exp
mkToJSON opts name = withType name (\_ cons -> consToJSON opts cons)


mkToJSON :: Options -- ^ Encoding options.
         -> Name -- ^ Name of the type to encode.
         -> Q Exp
mkToJSON opts name = withType name (\_ cons -> consToJSON opts cons)
mkToJSON opts name = withType name (\_ cons -> consToJSON opts cons)