#fromEntries Source

fromEntries :: Array (Tuple String JSON) -> JObject

Creates an JObject from an array of key/value pairs.

#fromFoldable Source

fromFoldable :: forall f. Foldable f => f (Tuple String JSON) -> JObject

Creates an JObject from a foldable source of key/value pairs.

#fromFoldableWithIndex Source

fromFoldableWithIndex :: forall f. FoldableWithIndex String f => f JSON -> JObject

Creates an JObject from an indexed foldable source.

#empty Source

empty :: JObject

An empty JObject.

#singleton Source

singleton :: String -> JSON -> JObject

Creates an JObject with a single entry.

#insert Source

insert :: String -> JSON -> JObject -> JObject

Inserts an entry into an JObject. If the key already exists the value will be overwritten.

#delete Source

delete :: String -> JObject -> JObject

Deletes an entry from an JObject. This will have no effect if the key does not exist in the object.

#entries Source

entries :: JObject -> Array (Tuple String JSON)

Extracts the key/value pairs of an JObject.

#keys Source

keys :: JObject -> Array String

Extracts the keys of an JObject.

#values Source

values :: JObject -> Array JSON

Extracts the values of an JObject.

#lookup Source

lookup :: String -> JObject -> Maybe JSON

Attempts to fetch the value for a key from an JObject. If the key is not present Nothing is returned.

#toUnfoldable Source

toUnfoldable :: forall f. Unfoldable f => JObject -> f (Tuple String JSON)

Unfolds an object into key/value pairs.

Re-exports from JSON.Internal

#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.