From d56429eefee3d2079ce7b45220844dc9a93f7e61 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Sep 2016 18:13:55 -0400 Subject: 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. --- Types/Messages.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Types/Messages.hs') 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 } -- cgit v1.2.3