Skip to content
Cinch
← Data.Json.Decode API referenceSAMPLE LISTING
cinch-json / 0.2.4Data/Json/Decode.cinch

Declaration source.

This sample listing contains the declarations shown in the API reference. Package implementations will appear here when real package data is connected.

module Data.Json.Decode where
3-- A typed decoder with a path-aware failure report.
4opaque Decoder a
5
6-- The path, expected type, and actual value at a failed decoding step.
7data DecodeError
8
9-- Apply a decoder to a JSON value.
10decode :: forall a. Decoder a -> Json -> Result DecodeError a
12-- Decode a named field in an object.
13field :: forall a. String -> Decoder a -> Decoder a
15-- Accept a JSON string.
16string :: Decoder String