json-autotype 0.2.1.2 → 0.2.1.3
raw patch · 3 files changed
+27/−17 lines, 3 files
Files
- README.md +12/−4
- changelog.md +14/−12
- json-autotype.cabal +1/−1
README.md view
@@ -1,29 +1,37 @@ 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.+Parser and printer instances are derived using [Aeson](http://hackage.haskell.org/package/aeson). +The program uses union type unification to trim output declarations. The types of same attribute tag and similar attribute set, are automatically unified using recognition by attribute set matching. (This option can be optionally turned off, or a set of unified types may be given explicitly.) `Either` alternatives is used to assure that all `JSON` inputs seen in example input file are handled correctly.+ I should probably write a short paper to explain the methodology. [](https://travis-ci.org/mgajda/json-autotype) [](https://hackage.haskell.org/package/json-autotype) -Details on official releases will be on [Hackage](https://hackage.haskell.org/package/json-autotype)+Details on official releases are on [Hackage](https://hackage.haskell.org/package/json-autotype) 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. +Occasionally you might find a valid JSON for which `json-autotype` doesn't generate a correct parser.+You may either edit the resulting file _and_ send it to the author as a test case for future release.++Patches and suggestions are welcome.
changelog.md view
@@ -1,22 +1,24 @@ Changelog ========= -0.2.1 Oct 2014----------------+ 0.2.1.3 Oct 2014 - * Added option to use it as a filter ('-' is accepted input name.)+ * Cleaned up package.+ * Changelog in markdown format. -0.2.0 Oct 2014----------------+ 0.2.1 Oct 2014 - * First release to Hackage.- * Handling of proper unions, and most examples.- * Automatically tested on a wide range of example documents (see- tests/)- *° Initial documentation in README.md.+ * Added option to use it as a filter ('-' is accepted input name.) -0.1.0 July 2014-----------------+ 0.2.0 Oct 2014++ * First release to Hackage.+ * Handling of proper unions, and most examples.+ * Automatically tested on a wide range of example documents (see+ tests/)+ * Initial documentation in README.md.++ 0.1.0 July 2014 * First experiments uploaded to GitHub, and discussed to HackerSpace.SG.
json-autotype.cabal view
@@ -1,6 +1,6 @@ -- Build information for the package. name: json-autotype-version: 0.2.1.2+version: 0.2.1.3 synopsis: Automatic type declaration for JSON input data description: Generates datatype declarations with Aeson's "FromJSON" instances from a set of example ".json" files.