blob: a515febb469fc514abd9548b92dbade3f71466ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import Data.Aeson.Encode.Pretty
import qualified Data.Aeson as J
import Data.ByteString.Lazy.Char8 as B
import Control.Monad
import System.Environment
main = do
args <- getArgs
forM_ args $ \fn -> do
v <- J.decode <$> B.readFile fn
let _ = v :: Maybe J.Value
mapM_ B.putStrLn (fmap encodePretty v)
|