The Jdh package

[Tags:library, mit]

This package provides JSON data encoding and decoding for Haskell. It also provides option for beautifying the JSON encoding output with indentation and line breaks. The JSValue data type is the center of the package, and it is a type constructor; it may have different Integral types, Fractional Types or IsString types.

[Skip to Readme]


Dependencies base (==4.8.*) [details]
License MIT
Author Bruno Corrêa Zimmermann
Stability Unknown
Category Data
Home page
Uploaded Sat Feb 25 22:59:57 UTC 2017 by brunoczim
Distributions NixOS:
Downloads 28 total (16 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for Jdh

Readme for Jdh-


A JSON implementation for haskell

module Main(
) where
import Data.Jdh.Json

main :: IO ()
main = do
    print $ fromArray [fromInt 3, fromInt 5, fromStr "Haha"]
    putStrLn $ encode True $ fromProps ["field1" =: fromInt 5, "field2" =: fromReal 3.5]
    putStrLn $ encode False $ fromProps ["condensed JSON data" =: fromBool True]
    print $ decode "{\"hello\": [\"world\"], \"nested\": {\"nested\": true}}"
    return ()