Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 7.7% forks on hackage.haskell.org

hackage.haskell.org : json-alt

Parsing JSON with Aeson often requires decoding fields that have more than one Haskell type. So we have: ``` data a :|: b = AltLeft a | AltLeft b printIt = print . (fromJSON :: ByteString -> Int :|: Bool) main = do printIt "1" -- AltLeft 1 printIt "true" -- AltRight True printIt "null" -- errors! ``` To generate types for larger JSON documents, you might use `json-autotype`. This is separate package so that users do not have to keep `json-autotype` as runtime dependency. See https://github.com/mgajda/json-autotype

Registry - Source - JSON
purl: pkg:hackage/json-alt
Keywords: bsd3, data, library, tools, elm, hackage, hacktoberfest2019, haskell, inference, json, json-autotype, parse, parser, unification, union
License: BSD-3-Clause
Latest release: over 5 years ago
First release: over 5 years ago
Dependent repositories: 3
Downloads: 1,197 total
Stars: 150 on GitHub
Forks: 23 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 2 days ago

    Loading...
    Readme
    Loading...