aboutsummaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-09-09 18:13:55 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-09-09 18:13:55 -0400
commitd56429eefee3d2079ce7b45220844dc9a93f7e61 (patch)
treec419e52a94254558e3a4ed1772178bd3052fb73a /Types
parent60b279fb6885852d9d62dc1cf91d526523de9e75 (diff)
drop incremental json object display; clean up code
This gets rid of quite a lot of ugly hacks around json generation. I doubt that any real-world json parsers can parse incomplete objects, so while it's not as nice to need to wait for the complete object, especially for commands like `git annex info` that take a while, it doesn't seem worth the added complexity. This also causes the order of fields within the json objects to be reordered. Since any real json parser shouldn't care, the only possible problem would be with ad-hoc parsers of the old json output.
Diffstat (limited to 'Types')
-rw-r--r--Types/Messages.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Types/Messages.hs b/Types/Messages.hs
index 49242ea45..751a513d6 100644
--- a/Types/Messages.hs
+++ b/Types/Messages.hs
@@ -10,7 +10,7 @@
module Types.Messages where
import Data.Default
-import qualified Data.ByteString.Lazy as B
+import qualified Data.Aeson as Aeson
#ifdef WITH_CONCURRENTOUTPUT
import System.Console.Regions (ConsoleRegion)
@@ -31,7 +31,7 @@ data MessageState = MessageState
, consoleRegion :: Maybe ConsoleRegion
, consoleRegionErrFlag :: Bool
#endif
- , jsonBuffer :: B.ByteString
+ , jsonBuffer :: Maybe Aeson.Object
}
instance Default MessageState
@@ -45,5 +45,5 @@ instance Default MessageState
, consoleRegion = Nothing
, consoleRegionErrFlag = False
#endif
- , jsonBuffer = B.empty
+ , jsonBuffer = Nothing
}