Module
Data.Argonaut.Encode
- Package
- purescript-argonaut-codecs
- Repository
- purescript-contrib/purescript-argonaut-codecs
#toJsonString Source
toJsonString :: forall t. EncodeJson t => t -> String
Encode and stringify a type in one step.
Re-exports from Data.Argonaut.Encode.Class
#EncodeJson Source
class EncodeJson a where
Members
encodeJson :: a -> Json
Instances
(EncodeJson a) => EncodeJson (Identity a)
(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 CodePoint
EncodeJson NonEmptyString
(EncodeJson a) => EncodeJson (NonEmpty Array a)
(EncodeJson a) => EncodeJson (NonEmptyArray a)
(EncodeJson a) => EncodeJson (NonEmpty List a)
(EncodeJson a) => EncodeJson (NonEmptyList a)
EncodeJson Char
(EncodeJson a) => EncodeJson (Array a)
(EncodeJson a) => EncodeJson (List a)
(EncodeJson a) => EncodeJson (Object a)
(Ord a, EncodeJson a) => EncodeJson (Set a)
(Ord a, EncodeJson a, EncodeJson b) => EncodeJson (Map a b)
EncodeJson Void
(GEncodeJson row list, RowToList row list) => EncodeJson (Record row)
Re-exports from Data.Argonaut.Encode.Combinators
#extendOptional Source
extendOptional :: forall a. EncodeJson a => Maybe (Tuple String Json) -> a -> Json
The named Encoders of the (~>?)
operator.
#assocOptional Source
assocOptional :: forall a. EncodeJson a => String -> Maybe a -> Maybe (Tuple String Json)
The named Encoders of the (:=?)
operator.
#(~>?) Source
Operator alias for Data.Argonaut.Encode.Combinators.extendOptional (right-associative / precedence 6)
Optionally extends a Json object with an optional Tuple String Json
property.
#(~>) Source
Operator alias for Data.Argonaut.Encode.Combinators.extend (right-associative / precedence 6)
Extends a Json object with a Tuple String Json
property.