@@ -54,8 +54,10 @@ import qualified Data.Conduit.List as CL
5454import Control.Monad.Trans.Class (MonadTrans, lift)
5555import Control.Monad.IO.Class (MonadIO, liftIO)
5656import Control.Monad (liftM)
57+import Data.Char (toUpper)
5758import qualified Data.Vector as V
5859import Data.Text (Text, pack)
60+import qualified Data.Text as T
5961import Data.Text.Read (signed, decimal, double)
6062import Data.Text.Encoding (encodeUtf8, decodeUtf8With)
6163import Data.Text.Encoding.Error (lenientDecode)
@@ -161,13 +163,16 @@ textToValue :: Style -> Text -> Value
161163textToValue SingleQuoted t = String t
162164textToValue DoubleQuoted t = String t
163165textToValue Folded t = String t
164−textToValue _ "true" = Bool True
165−textToValue _ "false" = Bool False
166166textToValue _ "null" = Null
167167textToValue _ t
168+ | any (t `isLike`) ["y", "yes", "on", "true"] = Bool True
169+ | any (t `isLike`) ["n", "no", "off", "false"] = Bool False
168170 | Right (x, "") <- signed decimal t = Number $ I x
169171 | Right (x, "") <- double t = Number $ D x
170172 | otherwise = String t
173+ where x `isLike` ref = x `elem` [ref, T.toUpper ref, titleCased]
174+ where titleCased = toUpper (T.head ref) `T.cons` T.tail ref
175+
171176
172177parseO :: C.Sink Event Parse Value
173178parseO = do