-- Build information for the package.
name: json-autotype
version: 0.4
synopsis: Automatic type declaration for JSON input data
description: Generates datatype declarations with Aeson's "FromJSON" instances
from a set of example ".json" files.
.
To get started you need to install the package,
and run "json-autotype" binary on an input ".json" file.
That will generate a new Aeson-based JSON parser.
.
"$ json-autotype input.json -o JSONTypes.hs"
.
Feel free to tweak the by changing types of the fields
- any field type that is instance of "FromJSON" should work.
.
You may immediately test the parser by calling it as a script:
.
"$ runghc JSONTypes.hs input.json"
.
See introduction on <https://github.com/mgajda/json-autotype>
for details.
homepage: https://github.com/mgajda/json-autotype
license: BSD3
license-file: LICENSE
stability: beta
author: Michal J. Gajda
maintainer: mjgajda@gmail.com
copyright: Copyright by Michal J. Gajda '2014-'2015
category: Data, Tools
build-type: Simple
extra-source-files: README.md changelog.md
cabal-version: >=1.10
bug-reports: https://github.com/mgajda/json-autotype/issues
tested-with: GHC==7.8.4
source-repository head
type: git
location: https://github.com/mgajda/json-autotype.git
library
exposed-modules: Data.Aeson.AutoType.Type
Data.Aeson.AutoType.Extract
Data.Aeson.AutoType.Format
Data.Aeson.AutoType.Pretty
Data.Aeson.AutoType.CodeGen
Data.Aeson.AutoType.Alternative
Data.Aeson.AutoType.Plugin.Subtype
Data.Aeson.AutoType.Plugin.Loader
other-extensions: TemplateHaskell,
ScopedTypeVariables,
OverloadedStrings,
FlexibleInstances,
MultiParamTypeClasses,
DeriveDataTypeable,
DeriveGeneric,
RecordWildCards
other-modules:
-- internal module
Data.Aeson.AutoType.Util
build-depends: base >=4.3 && <4.9,
GenericPretty >=1.2 && <1.3,
aeson >=0.7 && <0.9,
bytestring >=0.9 && <0.11,
containers >=0.3 && <0.6,
filepath >=1.3 && <1.5,
hashable >=1.2 && <1.3,
hint >=0.3 && <0.5,
hflags >=0.3 && <0.5,
lens >=4.1 && <4.10,
mtl >=2.1 && <2.3,
pretty >=1.1 && <1.3,
process >=1.1 && <1.4,
scientific >=0.3 && <0.5,
text >=1.1 && <1.4,
uniplate >=1.6 && <1.7,
unordered-containers >=0.2 && <0.3,
vector >=0.9 && <0.11
default-language: Haskell2010
executable json-autotype
main-is: GenerateJSONParser.hs
other-modules: Data.Aeson.AutoType.Util
other-extensions: TemplateHaskell,
ScopedTypeVariables,
OverloadedStrings,
FlexibleInstances,
MultiParamTypeClasses,
DeriveDataTypeable,
DeriveGeneric,
RecordWildCards
build-depends: base >=4.3 && <4.9,
GenericPretty >=1.2 && <1.3,
aeson >=0.7 && <0.9,
bytestring >=0.9 && <0.11,
containers >=0.3 && <0.6,
filepath >=1.3 && <1.5,
hashable >=1.2 && <1.3,
hflags >=0.3 && <0.5,
lens >=4.1 && <4.10,
mtl >=2.1 && <2.3,
pretty >=1.1 && <1.3,
process >=1.1 && <1.4,
scientific >=0.3 && <0.5,
text >=1.1 && <1.4,
uniplate >=1.6 && <1.7,
unordered-containers >=0.2 && <0.3,
vector >=0.9 && <0.11
-- hs-source-dirs:
default-language: Haskell2010
-- test suites
test-suite json-autotype-random-test
type: exitcode-stdio-1.0
main-is: GenerateTestJSON.hs
other-modules: Data.Aeson.AutoType.Util,
Data.Aeson.AutoType.Test,
Data.Aeson.AutoType.Type
other-extensions: TemplateHaskell,
ScopedTypeVariables,
OverloadedStrings,
FlexibleInstances,
MultiParamTypeClasses,
DeriveDataTypeable,
DeriveGeneric,
RecordWildCards
build-depends: base >=4.3 && <4.9,
GenericPretty >=1.2 && <1.3,
aeson >=0.7 && <0.9,
bytestring >=0.9 && <0.11,
containers >=0.3 && <0.6,
directory >=1.1 && <1.3,
filepath >=1.3 && <1.5,
hashable >=1.2 && <1.3,
hflags >=0.3 && <0.5,
lens >=4.1 && <4.10,
mtl >=2.1 && <2.3,
pretty >=1.1 && <1.3,
process >=1.1 && <1.4,
scientific >=0.3 && <0.5,
smallcheck >=1.0 && <1.2,
text >=1.1 && <1.4,
uniplate >=1.6 && <1.7,
unordered-containers >=0.2 && <0.3,
vector >=0.9 && <0.11,
QuickCheck >=2.4 && <3.0
-- hs-source-dirs:
default-language: Haskell2010
-- test suite with QuickCheck
test-suite json-autotype-qc-test
type: exitcode-stdio-1.0
main-is: TestQC.hs
other-modules: Data.Aeson.AutoType.Util,
Data.Aeson.AutoType.Test,
Data.Aeson.AutoType.Type
other-extensions: TemplateHaskell,
ScopedTypeVariables,
OverloadedStrings,
FlexibleInstances,
MultiParamTypeClasses,
DeriveDataTypeable,
DeriveGeneric,
RecordWildCards
build-depends: base >=4.3 && <4.9,
GenericPretty >=1.2 && <1.3,
aeson >=0.7 && <0.9,
bytestring >=0.9 && <0.11,
containers >=0.3 && <0.6,
directory >=1.1 && <1.3,
filepath >=1.3 && <1.5,
hashable >=1.2 && <1.3,
lens >=4.1 && <4.10,
mtl >=2.1 && <2.3,
pretty >=1.1 && <1.3,
process >=1.1 && <1.4,
scientific >=0.3 && <0.5,
smallcheck >=1.0 && <1.2,
text >=1.1 && <1.4,
uniplate >=1.6 && <1.7,
unordered-containers >=0.2 && <0.3,
vector >=0.9 && <0.11,
QuickCheck >=2.4 && <3.0
-- hs-source-dirs:
default-language: Haskell2010