@@ -2,7 +2,7 @@
22{-# LANGUAGE OverloadedStrings #-}
33module Json.Decode
44 ( Decoder, Error(..), decode, parse
5− , text, bool, int, float
5+ , string, text, bool, int, float
66 , list, dict, maybe
77 , field, at
88 , index
@@ -65,6 +65,11 @@ parse decoder bytestring =
6565-- PRIMITIVES
6666
6767
68+string :: Decoder String
69+string =
70+ Text.unpack <$> text
71+
72+
6873text :: Decoder Text
6974text =
7075 Decoder $ \mkError value ->