when serializing messages, include json objects
This is done always, it's up to the comsumer to decide if it wants to output the json objects or the messages. Messages.JSON.finalize changed to not need a JSONOptions. As far as I can see, this does not change its behavior, since addErrorMessage appends to any list that's already there. This commit was sponsored by Ethan Aubin.
This commit is contained in:
parent
5a41e46bd4
commit
e7f42e2ec7
3 changed files with 28 additions and 18 deletions
|
@ -12,6 +12,8 @@ import Utility.Metered
|
|||
|
||||
import Control.Concurrent
|
||||
import System.Console.Regions (ConsoleRegion)
|
||||
import qualified Data.ByteString as S
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
|
||||
data OutputType
|
||||
= NormalOutput
|
||||
|
@ -60,7 +62,8 @@ newMessageState = do
|
|||
}
|
||||
|
||||
data SerializedOutput
|
||||
= OutputMessage String
|
||||
= OutputMessage S.ByteString
|
||||
| OutputError String
|
||||
| ProgressMeter (Maybe Integer) MeterState MeterState
|
||||
| JSONObject L.ByteString
|
||||
deriving (Show, Read)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue