-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Basic types for representing JSON -- -- Basic types for representing JSON @package json-types @version 0.1 module Data.JSON.Types -- | 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. data Root RootObject :: Object -> Root RootArray :: Array -> Root -- | Objects store unordered associations between textual keys and -- Values. type Object = Map Text Value -- | Arrays are ordered sequences of Values. type Array = [Value] data Value ValueObject :: Object -> Value ValueArray :: Array -> Value ValueAtom :: Atom -> Value data Atom AtomNull :: Atom AtomBoolean :: Bool -> Atom -- | 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. AtomNumber :: Rational -> Atom AtomText :: Text -> Atom data Event EventBeginObject :: Event EventEndObject :: Event EventBeginArray :: Event EventEndArray :: Event EventAttributeName :: Text -> Event EventAtom :: Atom -> Event instance Show Atom instance Eq Atom instance Show Value instance Eq Value instance Show Root instance Eq Root instance Show Event instance Eq Event instance IsString Atom instance IsString Value