--- Revision None +++ Revision 373432623133 @@ -0,0 +1,26 @@ +-- test.hs +module Main where + +import Text.JSON + +main = do + x <- getLine + putStrLn (show $ (decode x :: Result JSValue)) + main + +-- problem +["this","is","some","json",{"that":"works"}] +["this","does +not"] + +-- nonexhaustive_pattern.patch +--- Text/JSON/String.hs 2010-03-07 10:16:59.410835389 +0100 ++++ Text/JSON/String.hs_ 2010-03-07 10:04:39.627628526 +0100 +@@ -128,6 +128,7 @@ + '\\' : c : ds -> esc rs c ds + '"' : ds -> do setInput ds + return (JSString (toJSString (reverse rs))) ++ [] -> fail $ "Unexpected end of String: " ++ reverse (context rs) + c : ds + | c >= '\x20' && c <= '\xff' -> parse (c:rs) ds + | c < '\x20' -> fail $ "Illegal unescaped character in string: " ++ context cs