cabal-version: 2.0 name: schemas version: 0.2.0 synopsis: schema guided serialization description: 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 @oneOf@ and @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 versioning. -- bug-reports: license: BSD3 license-file: LICENSE author: Pepe Iborra maintainer: pepeiborra@gmail.com -- copyright: category: Data build-type: Simple extra-source-files: CHANGELOG.md, README.md homepage: https://github.com/pepeiborra/schemas bug-reports: https://github.com/pepeiborra/schemas/issues source-repository head type: git location: https://github.com/pepeiborra/schemas.git library exposed-modules: Schemas Schemas.Class Schemas.Internal Schemas.OpenApi2 Schemas.SOP Schemas.Untyped -- other-modules: -- other-extensions: build-depends: base ^>=4.12.0.0 , aeson , bifunctors , bytestring , free , generics-sop >= 0.5.0.0 , hashable , lens , lens-aeson , profunctors , scientific , text , transformers , unordered-containers , vector hs-source-dirs: src default-language: Haskell2010 default-extensions: TypeApplications, OverloadedStrings, LambdaCase test-suite spec default-language: Haskell2010 default-extensions: TypeApplications type: exitcode-stdio-1.0 hs-source-dirs: example, test main-is: Main.hs other-modules: Person , Person2 , Person3 , SchemasSpec , Schemas.OpenApi2Spec , Generators build-depends: aeson , aeson-pretty , base , bytestring , generic-lens , generics-sop , hspec , lens , pretty-simple , QuickCheck , schemas , text , unordered-containers