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

LicenseMIT
Maintainerbrunoczim@gmail.com
Stabilityexperimental
PortabilityOS-Independent
Safe HaskellSafe
LanguageHaskell2010

Data.Jdh.Json.Big

Description

This module contains the big version for Json Values. Example: A JSInt is implemented as Integer. Although the module is destinated for big values (Integer, Double and String), all functions from Data.Json.Generic are avaible as generics. This module defines a type synonymous and two functions for encoding and decoding JSValue of this type.

Synopsis

Documentation

type Json = JSValue Integer Double String Source

A synonymous type for (JSValue Integer Double String)

encode :: Bool -> Json -> String Source

A function for encoding that specifies the types of JSValue to be the same as Json type. If the first argument is passed as false, the resulting string is condensed, otherwise, it will contain whitespaces as indentation and line breaks.

decode :: String -> [(Json, String)] Source

A function for decoding that specifies the types of JSValue to be the same as Json type.