Module
Data.Argonaut.Generic.Options
- Package
- purescript-argonaut-generic-codecs
- Repository
- eskimor/purescript-argonaut-generic-codecs
Options for generic encoding/decoding.
#Options Source
newtype Options
Constructors
Options { allNullaryToStringTag :: Boolean, constructorTagModifier :: String -> String, encodeSingleConstructors :: Boolean, fieldLabelModifier :: String -> String, flattenContentsArray :: Boolean, omitNothingFields :: Boolean, sumEncoding :: SumEncoding, userDecoding :: Options -> GenericSignature -> Json -> Maybe (Either String GenericSpine), userEncoding :: Options -> GenericSignature -> GenericSpine -> Maybe Json }
#SumEncoding Source
data SumEncoding
Constructors
TaggedObject { contentsFieldName :: String, tagFieldName :: String, unpackRecords :: Boolean }
#dummyUserEncoding Source
dummyUserEncoding :: Options -> GenericSignature -> GenericSpine -> Maybe Json
Use this for userEncoding
if you don't want any special rules.
#dummyUserDecoding Source
dummyUserDecoding :: Options -> GenericSignature -> Json -> Maybe (Either String GenericSpine)
Use this for userDecodeing
if you don't want any special rules.