json-to-type: Automatic type declaration for JSON input data
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
Warnings:
- These packages miss upper bounds: - GenericPretty - QuickCheck - aeson - bytestring - containers - data-default - filepath - hashable - lens - mtl - optparse-applicative - pretty - process - run-haskell-module - scientific - smallcheck - template-haskell - text - uniplate - unordered-containers - vector - yaml Please add them, using `cabal gen-bounds` for suggestions. For more information see: https://pvp.haskell.org/
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 author.)
.
.
See introduction on https://github.com/mgajda/json-to-type for details.'
.
[Skip to Readme]
Properties
Versions | 4.0.0, 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] |
License | BSD-3-Clause |
Copyright | Copyright by Migamake '2014-'2020 |
Author | Michal J. Gajda |
Maintainer | simons@cryp.to, mjgajda@gmail.com |
Category | Data, Tools |
Home page | https://github.com/jappeace/json-to-type.git#readme |
Bug tracker | https://github.com/jappeace/json-to-type/issues |
Source repo | head: git clone https://github.com/jappeace/json-to-type.git |
Uploaded | by Jappie at 2024-09-24T10:21:01Z |
Modules
[Index] [Quick Jump]
Downloads
- json-to-type-4.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees