Module

Data.Codec.Argonaut.Migration

Package
purescript-codec-argonaut
Repository
garyb/purescript-codec-argonaut

#addDefaultField Source

addDefaultField :: String -> Json -> JsonCodec Json

When dealing with a JSON object that may be missing a field, this codec can be used to alter the JSON before parsing to ensure a default value is present instead.

#renameField Source

renameField :: String -> String -> JsonCodec Json

When dealing with a JSON object that has had a field name changed, this codec can be used to alter the JSON before parsing to ensure the new field name is used instead