diff options
author | Kierán Meinhardt <kmein@posteo.de> | 2024-10-11 17:12:39 +0200 |
---|---|---|
committer | Kierán Meinhardt <kmein@posteo.de> | 2024-10-11 17:12:39 +0200 |
commit | 56fccc922fd3d7fdf748b7d2b6cf1df4e48bceb2 (patch) | |
tree | d53867adf7c02a8f2e88f3f310ff699ff28b23cf /src/Store/Query.hs | |
parent | ff448719b9fa0463639440dcdfcca17294a02d83 (diff) |
pretty print JSON
Diffstat (limited to 'src/Store/Query.hs')
-rw-r--r-- | src/Store/Query.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Store/Query.hs b/src/Store/Query.hs index c400206..091aae7 100644 --- a/src/Store/Query.hs +++ b/src/Store/Query.hs @@ -8,6 +8,7 @@ import Control.Arrow (second) import Control.Exception (throw) import Control.Monad.Trans (lift) import Data.Aeson qualified as J +import Data.Aeson.Encode.Pretty qualified as JP import Data.Aeson.Key qualified as JK import Data.Aeson.KeyMap qualified as JM import Data.List (foldl', foldl1') @@ -175,4 +176,4 @@ decodeFile c fn = do encodeFile :: String -> String -> J.Value -> S.StoreM () encodeFile c fn (J.Object kvs) = do let fp = c </> fn - S.writeFile fp (J.encode (J.Object (JM.filterWithKey (\k _ -> k /= "$fileName") kvs))) + S.writeFile fp (JP.encodePretty (J.Object (JM.filterWithKey (\k _ -> k /= "$fileName") kvs))) |