Data.Argonaut
- Package
- purescript-argonaut
- Repository
- purescript-contrib/purescript-argonaut
Re-exports from Data.Argonaut.Core
#jsonSingletonArray Source
jsonSingletonArray :: Json -> Json
#fromString Source
fromString :: JString -> Json
#fromObject Source
fromObject :: JObject -> Json
#fromNumber Source
fromNumber :: JNumber -> Json
#fromBoolean Source
fromBoolean :: JBoolean -> Json
#foldJsonString Source
foldJsonString :: forall a. a -> (JString -> a) -> Json -> a
A simpler version of foldJson
which accepts a callback for when the
Json
argument was a String
, and a default value for all other cases.
#foldJsonObject Source
foldJsonObject :: forall a. a -> (JObject -> a) -> Json -> a
A simpler version of foldJson
which accepts a callback for when the
Json
argument was a JObject
, and a default value for all other cases.
#foldJsonNumber Source
foldJsonNumber :: forall a. a -> (JNumber -> a) -> Json -> a
A simpler version of foldJson
which accepts a callback for when the
Json
argument was a Number
, and a default value for all other cases.
#foldJsonNull Source
foldJsonNull :: forall a. a -> (JNull -> a) -> Json -> a
A simpler version of foldJson
which accepts a callback for when the
Json
argument was null, and a default value for all other cases.
#foldJsonBoolean Source
foldJsonBoolean :: forall a. a -> (JBoolean -> a) -> Json -> a
A simpler version of foldJson
which accepts a callback for when the
Json
argument was a Boolean
, and a default value for all other cases.
#foldJsonArray Source
foldJsonArray :: forall a. a -> (JArray -> a) -> Json -> a
A simpler version of foldJson
which accepts a callback for when the
Json
argument was a JArray
, and a default value for all other cases.
Re-exports from Data.Argonaut.Decode
#DecodeJson Source
class DecodeJson a where
Members
decodeJson :: Json -> Either String a
Instances
(DecodeJson a) => DecodeJson (Maybe a)
(DecodeJson a, DecodeJson b) => DecodeJson (Tuple a b)
(DecodeJson a, DecodeJson b) => DecodeJson (Either a b)
DecodeJson Unit
DecodeJson Boolean
DecodeJson Number
DecodeJson Int
DecodeJson String
DecodeJson Json
DecodeJson Char
(DecodeJson a) => DecodeJson (StrMap a)
(DecodeJson a) => DecodeJson (Array a)
(DecodeJson a) => DecodeJson (List a)
(Ord a, DecodeJson a, DecodeJson b) => DecodeJson (Map a b)
DecodeJson Void
#(.?) Source
Operator alias for Data.Argonaut.Decode.Combinators.getField (non-associative / precedence 7)
Re-exports from Data.Argonaut.Encode
#EncodeJson Source
class EncodeJson a where
Members
encodeJson :: a -> Json
Instances
(EncodeJson a) => EncodeJson (Maybe a)
(EncodeJson a, EncodeJson b) => EncodeJson (Tuple a b)
(EncodeJson a, EncodeJson b) => EncodeJson (Either a b)
EncodeJson Unit
EncodeJson Boolean
EncodeJson Number
EncodeJson Int
EncodeJson String
EncodeJson Json
EncodeJson Char
(EncodeJson a) => EncodeJson (Array a)
(EncodeJson a) => EncodeJson (List a)
(EncodeJson a) => EncodeJson (StrMap a)
(Ord a, EncodeJson a, EncodeJson b) => EncodeJson (Map a b)
EncodeJson Void
#extend Source
extend :: forall a. EncodeJson a => JAssoc -> a -> Json
The named implementation of the (~>)
operator.
#assoc Source
assoc :: forall a. EncodeJson a => String -> a -> JAssoc
The named implementation of the (:=)
operator.
#(~>) Source
Operator alias for Data.Argonaut.Encode.Combinators.extend (right-associative / precedence 6)
Extends a Json object with a JAssoc
property.
#(:=) Source
Operator alias for Data.Argonaut.Encode.Combinators.assoc (non-associative / precedence 7)
Creates a JAssoc
entry, representing a key/value pair for an object.
Re-exports from Data.Argonaut.JCursor
#primToJson Source
primToJson :: JsonPrim -> Json
#inferEmpty Source
inferEmpty :: JCursor -> Json
Re-exports from Data.Argonaut.Parser
Re-exports from Data.Argonaut.Prisms
Re-exports from Data.Argonaut.Traversals
- Modules
- Data.
Argonaut