generic-aeson: Derivation of Aeson instances using GHC generics.

[ bsd3, data, library ] [ Propose Tags ]

Derivation of Aeson instances using GHC generics.


[Skip to Readme]
Versions [RSS] [faq] 0.1, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.1, 0.1.1.1, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.2.0.5, 0.2.0.6, 0.2.0.7, 0.2.0.8, 0.2.0.9, 0.2.0.10, 0.2.0.11, 0.2.0.12
Change log CHANGELOG.md
Dependencies aeson (>=0.6 && <0.9), attoparsec (>=0.11 && <0.13), base (>=4.6 && <4.8), generic-deriving (==1.6.*), mtl (>=2.0 && <2.3), tagged (>=0.2 && <0.8), text (>=0.11 && <1.2), vector (==0.10.*) [details]
License BSD-3-Clause
Author Silk
Maintainer code@silk.co
Revised Revision 1 made by AdamBergmark at 2015-04-03T14:43:00Z
Category Data
Source repo head: git clone https://github.com/silkapp/generic-aeson.git
Uploaded by AdamBergmark at 2014-07-21T12:21:08Z
Distributions LTSHaskell:0.2.0.12, NixOS:0.2.0.12, Stackage:0.2.0.12
Downloads 18523 total (31 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Successful builds reported [all 1 reports]

Modules

[Index]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for generic-aeson-0.1.1.1

[back to package description]

generic-aeson

Build Status

The structure of the generated JSON is meant to be close to idiomatic JSON. This means:

  • Enumerations are converted to JSON strings.

  • Record fields become JSON keys.

  • Data types with one unlabeled field convert to just that field.

  • Data types with multiple unlabeled fields become arrays.

  • Multiple constructors are represented by keys.

  • 'Maybe' values are either an absent key, or the value.

See tests/Main.hs for more examples.