diff --git a/aeson-value-parser.cabal b/aeson-value-parser.cabal
--- a/aeson-value-parser.cabal
+++ b/aeson-value-parser.cabal
@@ -1,5 +1,5 @@
 name: aeson-value-parser
-version: 0.19.0.1
+version: 0.19.1
 synopsis: API for parsing "aeson" JSON tree into Haskell types
 description:
   A flexible parser DSL of JSON AST produced by the \"aeson\" library
diff --git a/library/AesonValueParser.hs b/library/AesonValueParser.hs
--- a/library/AesonValueParser.hs
+++ b/library/AesonValueParser.hs
@@ -22,6 +22,7 @@
   -- * String parsers
   String,
   text,
+  narrowedText,
   matchedText,
   attoparsedText,
   megaparsedText,
@@ -171,6 +172,13 @@
 {-# INLINE text #-}
 text :: String Text
 text = String ask
+
+{-# INLINE narrowedText #-}
+narrowedText :: (Text -> Maybe a) -> String a
+narrowedText narrow = matchedText match where
+  match text = case narrow text of
+    Just a -> Right a
+    _ -> Left ("Unexpected value: \"" <> text <> "\"")
 
 {-# INLINE matchedText #-}
 matchedText :: (Text -> Either Text a) -> String a
