Created
October 2, 2018 00:03
-
-
Save theSeafarer/159c7884b5a8761d4d699894bf1c9560 to your computer and use it in GitHub Desktop.
Stupid JSON pretty-printer thingy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeApplications #-} | |
module Main where | |
import System.Environment | |
import Data.Aeson | |
import Data.Aeson.Encode.Pretty | |
import Data.Maybe ( fromJust ) | |
import qualified Data.ByteString.Lazy as LBS | |
main = LBS.putStr | |
. encodePretty | |
. fromJust | |
. decode @(Maybe Value) | |
=<< LBS.readFile | |
. head | |
=<< getArgs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment