diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-07-26 13:30:07 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-07-26 13:30:07 -0400 |
commit | 3eb54bb464b4566e5ea5fe9db5addc20231597d0 (patch) | |
tree | 265691703d3ee1c8f64dc6accc7dd0c30fbb3c3b /Command/Find.hs | |
parent | 4ee3e4194a716273f68641ba0312339ab7c70b8b (diff) |
allow using Aeson for streaming JSON output
Keeping Text.JSON use for now, because it seems a better fit for most of
the commands, which don't use very structured JSON objects, but just output
whatever fields suites them. But this lets Aeson be used when a more
structured data type is available to serialize to JSON.
Diffstat (limited to 'Command/Find.hs')
-rw-r--r-- | Command/Find.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Find.hs b/Command/Find.hs index 08c720575..9cd075ed6 100644 --- a/Command/Find.hs +++ b/Command/Find.hs @@ -66,7 +66,7 @@ start o file key = ifM (limited <||> inAnnex key) showFormatted :: Maybe Utility.Format.Format -> String -> [(String, String)] -> Annex () showFormatted format unformatted vars = - unlessM (showFullJSON vars) $ + unlessM (showFullJSON $ JSONObject vars) $ case format of Nothing -> liftIO $ putStrLn unformatted Just formatter -> liftIO $ putStr $ |