schemas: schema guided serialization
Schemas is a Haskell library for serializing and deserializing data in JSON. With schemas one does not define parsing and encoding functions, instead one defines a schema that explains the "shape" of the data, and the library provides the encode and decode functions. Shape descriptions are statically typed.
Schemas are related by a subtyping relation, which can be used to implement a simple form of schema versioning. As long as one knows the source and target schemas, and the source is a subtype of the target, source values can be encoded in the target schema.
The library also supports
allOf schemas, which extend the
range of versioning changes that can be supported automatically without
resorting to explicit versions and conversion functions.
A type class
HasSchema is provided purely for convenience, but none of the
core functions in the library rely on type classes.
Schemas can be derived generically using
generics-sop, although most of the
time it makes more sense to define the schemas explicitly to ensure well-behaved
[Skip to Readme]
|Versions [faq]||0.1.0.0, 0.1.1.0, 0.2.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.3.0, 0.3.0.1, 0.3.0.2|
|Dependencies||aeson, base (>=184.108.40.206 && <4.13), bifunctors, bytestring, free, generics-sop (>=0.5.0.0), hashable, lens, lens-aeson, profunctors, scientific, text, transformers, unordered-containers, vector [details]|
|Source repo||head: git clone https://github.com/pepeiborra/schemas.git|
|Uploaded||by PepeIborra at Tue Oct 29 20:14:24 UTC 2019|
|Downloads||500 total (84 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
Docs available [build log]
Last success reported on 2019-10-29 [all 1 reports]
For package maintainers and hackage trustees