cabal-version: 3.0
name: aeson-generic-default
version: 0.1.1.0
synopsis: Type-level default fields for aeson Generic FromJSON parser
description: Define default values for missing FromJSON object fields within field type declaration.
It becomes handy e.g. for parsing yaml configuration files. The default values are mostly defined
directly at the type level so that the user doesn't have to write manual FromJSON instance.
license: BSD-3-Clause
license-file: LICENSE
author: Ondrej Palkovsky
maintainer: palkovsky.ondrej@gmail.com
-- copyright:
category: Text, Web, JSON
build-type: Simple
extra-doc-files: CHANGELOG.md README.md
tested-with: GHC == 9.2.8, GHC == 9.6.5, GHC == 9.10.1
homepage: https://github.com/ondrap/aeson-generic-default
bug-reports: https://github.com/ondrap/aeson-generic-default/issues
common warnings
ghc-options: -Wall
common extensions
default-extensions:
AllowAmbiguousTypes
DataKinds
DeriveAnyClass
DeriveFunctor
DeriveGeneric
DerivingVia
DuplicateRecordFields
FlexibleContexts
FlexibleInstances
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
MultiWayIf
NamedFieldPuns
NoMonomorphismRestriction
OverloadedStrings
OverloadedRecordDot
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
TypeFamilies
TypeOperators
GADTs
PatternSynonyms
library
import: warnings, extensions
exposed-modules: Data.Aeson.DefaultField
build-depends:
base >=4.16 && < 5,
aeson >= 2.2 && < 2.3,
data-default >= 0.7 && < 0.8,
text >= 2.0 && < 2.2
hs-source-dirs: src
default-language: GHC2021
test-suite aeson-default-field-test
import: warnings, extensions
default-language: GHC2021
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
build-depends:
base,
aeson-generic-default,
tasty,
tasty-hunit,
aeson,
text,
data-default