api-tools-0.9.0.0: DSL for generating API boilerplate and docs
Safe HaskellNone
LanguageHaskell2010

Data.API.Tools.JSON

Synopsis

Documentation

jsonTool :: APITool Source #

Tool to generate ToJSON and FromJSONWithErrs instances for types generated by datatypesTool. This depends on enumTool. For historical reasons this does not generate FromJSON instances; you probably want to use jsonTool' instead.

jsonTool' :: APITool Source #

Tool to generate ToJSON, FromJSON and FromJSONWithErrs instances for types generated by datatypesTool. This depends on enumTool. Note that generated FromJSON and FromJSONWithErrs instances will always agree on the decoding of a value, but that the FromJSONWithErrs instances for basic types are more liberal than FromJSON.

toJsonNodeTool :: APINodeTool Source #

Tool to generate ToJSON instance for an API node

fromJsonNodeTool :: APINodeTool Source #

Tool to generate FromJSON instance for an API node, which relies on the FromJSONWithErrs instance.

fromJsonWithErrsNodeTool :: APINodeTool Source #

Tool to generate FromJSONWithErrs instance for an API node