Jdh: A Json implementation for Haskell, with JavaScript Values and Encoding/Decoding

[ data, library, mit ] [ Propose Tags ]

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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1
Dependencies base (>=4.8 && <4.9) [details]
License MIT
Author Bruno Corrêa Zimmermann
Maintainer brunoczim@gmail.com
Category Data
Home page https://github.com/brunoczim/Json-Data-for-Haskell
Uploaded by brunoczim at 2017-02-25T22:59:57Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1740 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for Jdh-0.1.0.1

[back to package description]

JSON-for-Haskell

A JSON implementation for haskell

module Main(
    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 ()