json-types-0.1: Basic types for representing JSON

Data.JSON.Types

Contents

Synopsis

DOM-based

data Root Source

Each JSON document has a single root, which may be either an Object or Array.

Some parsers allow non-container roots, but portable libraries should not depend on this incorrect behavior.

Instances

type Object = Map Text ValueSource

Objects store unordered associations between textual keys and Values.

type Array = [Value]Source

Arrays are ordered sequences of Values.

data Atom Source

Constructors

AtomNull 
AtomBoolean Bool 
AtomNumber Rational

JSON numbers may be of arbitrary length and precision. Using Rational allows any valid parsed number to be stored; however, note that only rationals with a finite decimal expansion can be fully serialized. For example, attempting to serialize (1 % 3) will lose precision.

AtomText Text 

Instances

Event-based