@hackage json-autotype0.2.1.2
Automatic type declaration for JSON input data
Categories
License
BSD-3-Clause
Maintainer
mjgajda@gmail.com
Links
Versions
Installation
Dependencies (0)
- MissingH >=1.2 && <1.3
- aeson >=0.7 && <0.9
- base >=4.3 && <4.8
- bytestring >=0.9 && <0.11
- containers >=0.3 && <0.6
- filepath >=1.3 && <1.4 Show all…
Dependents (5)
@hackage/speechmatics, @hackage/acme-everything, @hackage/voicebase, @hackage/vflow-types, @hackage/JuPyTer-notebook
json-autotype
Takes a JSON format input, and generates automatic Haskell type declarations. Goal is to also generate parser, and pretty-printer instances.
It uses union type unification. Types inferred may be automatically trimmed and unified using attribute set matching.
I should probably write a short paper to explain the methodology.
Details on official releases will be on Hackage
USAGE:
After installing with cabal install json-autotype, you might generate stub code for the parser:
json-autotype input.json -o MyFormat.hs
Then you might test the parser by running it on an input file:
runghc MyFormat.hs input.json
If everything is correct, then feel free to inspect the data structure generated automatically for you! The goal of this program is to make it easy for users of big JSON APIs to generate entries from example data.
