Module

JSON.Internal

Package
purescript-json
Repository
garyb/purescript-json

#JSON Source

data JSON

A type that represents all varieties of JSON value.

This is not a PureScript sum type, instead the underlying JSON representation is used for efficiency and performance reasons.

Instances

#_false Source

_false :: forall a. a -> Boolean

#_lt Source

_lt :: forall a. a -> Ordering

#_gt Source

_gt :: forall a. a -> Ordering

#JArray Source

data JArray

A type that represents JSON arrays. Similar to the JSON type, this is not a PureScript type, but represents the underlying representation for JSON arrays.

Instances

#toArray Source

toArray :: JArray -> Array JSON

Converts a JArray into an Array of JSON values

#fromArray Source

fromArray :: Array JSON -> JArray

Converts an Array of JSON values into a JArray.

#empty Source

empty :: JArray

An empty JArray.

#JObject Source

data JObject

A type that represents JSON objects. Similar to the JSON type, this is not a PureScript type, but represents the underlying representation for JSON objects.

Instances

#_parse Source

_parse :: forall f. Fn3 (forall a b. a -> f a b) (forall a b. b -> f a b) String (f String JSON)

#_fromNumberWithDefault Source

#_case Source

_case :: forall a. Fn7 (Unit -> a) (Boolean -> a) (Number -> a) (String -> a) (JArray -> a) (JObject -> a) JSON a

#_fromEntries Source

_fromEntries :: forall f. Fn3 (forall x y. f x y -> x) (forall x y. f x y -> y) (Array (f String JSON)) JObject

#_entries Source

_entries :: forall c. Fn2 (String -> JSON -> c) JObject (Array c)

#_lookup Source

_lookup :: forall f. Fn4 (forall a. f a) (forall a. a -> f a) String JObject (f JSON)

#_index Source

_index :: forall f. Fn4 (forall a. f a) (forall a. a -> f a) Int JArray (f JSON)

#length Source