Module

Codec.Json.Unidirectional.Encode.Value

Package
purescript-json-codecs
Repository
jordanmartinez/purescript-json-codecs

#encodeVoid Source

#encodeJNull Source

#encodeUnitToNull Source

#encodeBoolean Source

#encodeNumber Source

#encodeInt Source

#encodeChar Source

#encodeString Source

#encodeArray Source

encodeArray :: forall a. (a -> Json) -> Array a -> Json

#encodeJArray Source

#encodeNonEmptyArray Source

encodeNonEmptyArray :: forall a. (a -> Json) -> NonEmptyArray a -> Json

#encodeObject Source

encodeObject :: forall a. (a -> Json) -> Object a -> Json

#encodeJObject Source

#encodeNullable Source

encodeNullable :: forall a. (a -> Json) -> Nullable a -> Json

#encodeIdentity Source

encodeIdentity :: forall a. (a -> Json) -> Identity a -> Json

#encodeMaybeTagged Source

encodeMaybeTagged :: forall a. (a -> Json) -> Maybe a -> Json

#encodeMaybeNullable Source

encodeMaybeNullable :: forall a. (a -> Json) -> Maybe a -> Json

#encodeEither Source

encodeEither :: forall a b. (a -> Json) -> (b -> Json) -> Either a b -> Json

#encodeTuple Source

encodeTuple :: forall a b. (a -> Json) -> (b -> Json) -> Tuple a b -> Json

#encodeThese Source

encodeThese :: forall a b. (a -> Json) -> (b -> Json) -> These a b -> Json

#encodeNonEmpty Source

encodeNonEmpty :: forall f a. (a -> Json) -> (f a -> Json) -> NonEmpty f a -> Json

#encodeList Source

encodeList :: forall a. (a -> Json) -> List a -> Json

#encodeNonEmptyList Source

encodeNonEmptyList :: forall a. (a -> Json) -> (NonEmptyList a -> Json)

#encodeMap Source

encodeMap :: forall k v. (k -> Json) -> (v -> Json) -> Map k v -> Json

#encodeSet Source

encodeSet :: forall a. (a -> Json) -> Set a -> Json

#encodeNonEmptySet Source

encodeNonEmptySet :: forall a. (a -> Json) -> NonEmptySet a -> Json

#encodeCodePoint Source

#encodeFix Source

encodeFix :: forall extra a. (Fn2 extra a Json -> Fn2 extra a Json) -> Fn2 extra a Json

#RLRecordEncoder Source

newtype RLRecordEncoder :: RowList Type -> Row Type -> Typenewtype RLRecordEncoder rowList rows

#RLRecordEncoderBuilder Source

newtype RLRecordEncoderBuilder :: RowList Type -> Row Type -> RowList Type -> Row Type -> Typenewtype RLRecordEncoderBuilder fromRl fromRows toRl toRows

#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

#encodeVariantEmpty Source

#encodeVariantPrim Source

encodeVariantPrim :: forall rows. ((Variant () -> Object Json) -> (Variant rows -> Object Json)) -> Variant rows -> Json

#encodeVariantCase Source

encodeVariantCase :: forall sym a tail row. IsSymbol sym => Cons sym a tail row => Proxy sym -> Either a (a -> Json) -> (Variant tail -> Object Json) -> (Variant row -> Object Json)

#InsertRequiredPropEncoders Source

class InsertRequiredPropEncoders :: RowList Type -> Row Type -> RowList Type -> Row Type -> RowList Type -> Row Type -> Constraintclass InsertRequiredPropEncoders propsRl props oldRl oldRows newRl newRows | propsRl props oldRl oldRows -> newRl newRows where

Members

Instances

#InsertOptionalPropEncoders Source

class InsertOptionalPropEncoders :: RowList Type -> Row Type -> RowList Type -> Row Type -> RowList Type -> Row Type -> Constraintclass InsertOptionalPropEncoders propsRl props oldRl oldRows newRl newRows | propsRl props oldRl oldRows -> newRl newRows where

Members

Instances

#EncodeRowList Source

class EncodeRowList :: RowList Type -> Row Type -> Row Type -> Constraintclass EncodeRowList rowlist encodeRows inputRows | rowlist encodeRows -> inputRows where

Members

Instances

#VRecord Source

newtype VRecord :: RowList Type -> Row Type -> Typenewtype VRecord rowlist rows

#EncodeJsonVariant Source

class EncodeJsonVariant :: RowList Type -> Row Type -> Row Type -> Constraintclass EncodeJsonVariant rowlist row out | rowlist -> row out where

Members

Instances