Skip to content

Instantly share code, notes, and snippets.

@AndrewO
Forked from anonymous/Main.hs
Created February 6, 2014 14:05
Show Gist options
  • Save AndrewO/8844782 to your computer and use it in GitHub Desktop.
Save AndrewO/8844782 to your computer and use it in GitHub Desktop.
module MountJSON where
-- import Prelude hiding (getContents)
import qualified Data.Aeson as JSON
import qualified Data.ByteString.Lazy.Char8 as Char
main :: IO ()
main = do
input <- Char.getContents
case JSON.eitherDecode input of
Left err -> putStrLn $ "Bad JSON: " ++ err
Right value -> do
putStrLn "Got:"
putStrLn value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment