Module
Codec.Json.Unidirectional.Encode.Value
- Package
- purescript-json-codecs
- Repository
- jordanmartinez/purescript-json-codecs
#encodeVoid Source
encodeVoid :: Void -> Json
#encodeJNull Source
encodeJNull :: Json
#encodeUnitToNull Source
encodeUnitToNull :: Unit -> Json
#encodeBoolean Source
encodeBoolean :: Boolean -> Json
#encodeNumber Source
encodeNumber :: Number -> Json
#encodeChar Source
encodeChar :: Char -> Json
#encodeString Source
encodeString :: String -> Json
#encodeNonEmptyArray Source
encodeNonEmptyArray :: forall a. (a -> Json) -> NonEmptyArray a -> Json
#encodeNonEmpty Source
encodeNonEmpty :: forall f a. (a -> Json) -> (f a -> Json) -> NonEmpty f a -> Json
#encodeNonEmptyList Source
encodeNonEmptyList :: forall a. (a -> Json) -> (NonEmptyList a -> Json)
#encodeNonEmptySet Source
encodeNonEmptySet :: forall a. (a -> Json) -> NonEmptySet a -> Json
#encodeCodePoint Source
encodeCodePoint :: CodePoint -> Json
#RLRecordEncoder Source
newtype RLRecordEncoder :: RowList Type -> Row Type -> Type
newtype RLRecordEncoder rowList rows
#encodeRecord Source
encodeRecord :: forall props propsRl newRl newRows inputRows. RowToList props propsRl => InsertRequiredPropEncoders propsRl props Nil () newRl newRows => EncodeRowList newRl newRows inputRows => Record props -> Record inputRows -> Json
#encodeRecordPrim Source
encodeRecordPrim :: forall encodeRows encodeRl inputRows. EncodeRowList encodeRl encodeRows inputRows => RLRecordEncoder encodeRl encodeRows -> Record inputRows -> Json
#buildRecordEncoder Source
buildRecordEncoder :: forall encodeRows encodeRl. (RLRecordEncoderBuilder Nil () encodeRl encodeRows) -> RLRecordEncoder encodeRl encodeRows
#encodeRequiredProp Source
encodeRequiredProp :: forall sym a oldRows oldRl newRows. Cons sym (String -> a -> Object Json -> Object Json) oldRows newRows => IsSymbol sym => Lacks sym oldRows => Proxy sym -> (a -> Json) -> RLRecordEncoderBuilder oldRl oldRows (Cons sym (String -> a -> Object Json -> Object Json) oldRl) newRows
#encodeOptionalProp Source
encodeOptionalProp :: forall sym a oldRows oldRl newRows. Cons sym (String -> Maybe a -> Object Json -> Object Json) oldRows newRows => IsSymbol sym => Lacks sym oldRows => Proxy sym -> (a -> Json) -> RLRecordEncoderBuilder oldRl oldRows (Cons sym (String -> Maybe a -> Object Json -> Object Json) oldRl) newRows
#encodeRequiredProps Source
encodeRequiredProps :: forall props propsRl oldRl oldRows newRl newRows. RowToList props propsRl => InsertRequiredPropEncoders propsRl props oldRl oldRows newRl newRows => Record props -> RLRecordEncoderBuilder oldRl oldRows newRl newRows
#encodeOptionalProps Source
encodeOptionalProps :: forall props propsRl oldRl oldRows newRl newRows. RowToList props propsRl => InsertOptionalPropEncoders propsRl props oldRl oldRows newRl newRows => Record props -> RLRecordEncoderBuilder oldRl oldRows newRl newRows
#encodeVariant Source
encodeVariant :: forall rows rl out. RowToList rows rl => EncodeJsonVariant rl rows out => Record rows -> Variant out -> Json
#InsertRequiredPropEncoders Source
class InsertRequiredPropEncoders :: RowList Type -> Row Type -> RowList Type -> Row Type -> RowList Type -> Row Type -> Constraint
class InsertRequiredPropEncoders propsRl props oldRl oldRows newRl newRows | propsRl props oldRl oldRows -> newRl newRows where
Members
insertRequiredPropEncoders :: RLRecordEncoder propsRl props -> RLRecordEncoderBuilder oldRl oldRows newRl newRows
Instances
InsertRequiredPropEncoders Nil props oldRl oldRows oldRl oldRows
(Cons sym (a -> Json) propsTail props, InsertRequiredPropEncoders propsRlTail props oldRl oldRows tailRl tailRows, Lacks sym tailRows, Cons sym (String -> a -> Object Json -> Object Json) tailRows newRows, IsSymbol sym) => InsertRequiredPropEncoders (Cons sym (a -> Json) propsRlTail) props oldRl oldRows (Cons sym (String -> a -> Object Json -> Object Json) tailRl) newRows
#InsertOptionalPropEncoders Source
class InsertOptionalPropEncoders :: RowList Type -> Row Type -> RowList Type -> Row Type -> RowList Type -> Row Type -> Constraint
class InsertOptionalPropEncoders propsRl props oldRl oldRows newRl newRows | propsRl props oldRl oldRows -> newRl newRows where
Members
insertOptionalPropEncoders :: RLRecordEncoder propsRl props -> RLRecordEncoderBuilder oldRl oldRows newRl newRows
Instances
InsertOptionalPropEncoders Nil props oldRl oldRows oldRl oldRows
(Cons sym (a -> Json) propsTail props, InsertOptionalPropEncoders propsRlTail props oldRl oldRows tailRl tailRows, Lacks sym tailRows, Cons sym (String -> Maybe a -> Object Json -> Object Json) tailRows newRows, IsSymbol sym) => InsertOptionalPropEncoders (Cons sym (a -> Json) propsRlTail) props oldRl oldRows (Cons sym (String -> Maybe a -> Object Json -> Object Json) tailRl) newRows
#EncodeRowList Source
class EncodeRowList :: RowList Type -> Row Type -> Row Type -> Constraint
class EncodeRowList rowlist encodeRows inputRows | rowlist encodeRows -> inputRows where
Members
encodeRowList :: RLRecordEncoder rowlist encodeRows -> Record inputRows -> Object Json
Instances
EncodeRowList Nil encodeRows inputRows
(Cons sym (String -> a -> Object Json -> Object Json) unused encodeRows, Cons sym a inputTail inputRows, EncodeRowList tailList encodeRows inputRows, IsSymbol sym) => EncodeRowList (Cons sym (String -> a -> Object Json -> Object Json) tailList) encodeRows inputRows
#EncodeJsonVariant Source
class EncodeJsonVariant :: RowList Type -> Row Type -> Row Type -> Constraint
class EncodeJsonVariant rowlist row out | rowlist -> row out where
Members
encodeJsonVariant :: VRecord rowlist row -> ((Variant () -> Object Json) -> (Variant out -> Object Json))
Instances
EncodeJsonVariant Nil () ()
(Cons sym (Either a (a -> Json)) codecRows' codecRows, EncodeJsonVariant tail codecRows' out', Cons sym a out' out, IsSymbol sym) => EncodeJsonVariant (Cons sym (Either a (a -> Json)) tail) codecRows out
- Modules
- Codec.
Codec - Codec.
Decoder - Codec.
Decoder. Qualified - Codec.
Json. Bidirectional. Class - Codec.
Json. Bidirectional. Value - Codec.
Json. Errors. AnsiDodoError - Codec.
Json. Errors. DecodeMessages - Codec.
Json. Errors. NoError - Codec.
Json. Errors. PlainDodoError - Codec.
Json. Errors. PrimitiveJsonError - Codec.
Json. Errors. Tree - Codec.
Json. JsonCodec - Codec.
Json. JsonDecoder - Codec.
Json. Newtypes - Codec.
Json. Types - Codec.
Json. Unidirectional. Decode. Class - Codec.
Json. Unidirectional. Decode. Value - Codec.
Json. Unidirectional. Encode. Class - Codec.
Json. Unidirectional. Encode. Value - Data.
V. Semigroup. Qualified