Module
Classless.DecodeJson
- Package
- purescript-classless-decode-json
- Repository
- thought2/purescript-classless-decode-json
#DecodeJson Source
type DecodeJson a = Json -> Either JsonDecodeError a
#array Source
array :: forall a. DecodeJson a -> DecodeJson (Array a)
#GDecodeJson Source
class GDecodeJson :: Row Type -> Row Type -> RowList Type -> Constraint
class GDecodeJson (spec :: Row Type) (row :: Row Type) (list :: RowList Type) | list -> row spec where
Members
gDecodeJson :: forall proxy. Record spec -> Object Json -> proxy list -> Either JsonDecodeError (Record row)
Instances
GDecodeJson () () Nil
(DecodeJsonField value, GDecodeJson specX rowTail tail, IsSymbol field, Cons field value rowTail row, Lacks field rowTail, Cons field (Json -> Either JsonDecodeError value) specX spec, Union specX x spec) => GDecodeJson spec row (Cons field value tail)
#either Source
either :: forall a b. DecodeJson a -> DecodeJson b -> DecodeJson (Either a b)
#int Source
int :: DecodeJson Int
#tuple Source
tuple :: forall a b. DecodeJson a -> DecodeJson b -> DecodeJson (Tuple a b)
#DecodeJsonField Source
class DecodeJsonField a where
Members
decodeJsonField :: (Json -> Either JsonDecodeError a) -> Maybe Json -> Maybe (Either JsonDecodeError a)
Instances
#maybe Source
maybe :: forall a. DecodeJson a -> DecodeJson (Maybe a)