Module
Data.Foreign.Generic.Types
- Package
- purescript-foreign-generic
- Repository
- paf31/purescript-foreign-generic
#Options Source
type Options = { sumEncoding :: SumEncoding, unwrapSingleArguments :: Boolean, unwrapSingleConstructors :: Boolean }#SumEncoding Source
data SumEncodingThe encoding of sum types for your type.
TaggedObjects will be encoded in the form { [tagFieldName]: "ConstructorTag", [contentsFieldName]: "Contents"}.
constructorTagTransform can be provided to transform the constructor tag to a form you use, e.g. toLower/toUpper.
Constructors
TaggedObject { constructorTagTransform :: String -> String, contentsFieldName :: String, tagFieldName :: String }