diff options
author | Mattes D <github@xoft.cz> | 2016-12-15 20:25:02 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-12-16 00:07:23 +0100 |
commit | c7ce9909c86445360c9a2b960cde13d4380679ba (patch) | |
tree | 56ca5369d83504ac063dbc3139f72dc2cdf42610 | |
parent | Initial support for the 1.11 protocol. (diff) | |
download | cuberite-c7ce9909c86445360c9a2b960cde13d4380679ba.tar cuberite-c7ce9909c86445360c9a2b960cde13d4380679ba.tar.gz cuberite-c7ce9909c86445360c9a2b960cde13d4380679ba.tar.bz2 cuberite-c7ce9909c86445360c9a2b960cde13d4380679ba.tar.lz cuberite-c7ce9909c86445360c9a2b960cde13d4380679ba.tar.xz cuberite-c7ce9909c86445360c9a2b960cde13d4380679ba.tar.zst cuberite-c7ce9909c86445360c9a2b960cde13d4380679ba.zip |
-rw-r--r-- | src/CompositeChat.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/CompositeChat.cpp b/src/CompositeChat.cpp index 657d88292..621c871c8 100644 --- a/src/CompositeChat.cpp +++ b/src/CompositeChat.cpp @@ -406,7 +406,14 @@ AString cCompositeChat::CreateJsonString(bool a_ShouldUseChatPrefixes) const msg["extra"].append(Part); } // for itr - Parts[] - return msg.toStyledString(); + #if 1 + // Serialize as machine-readable string (no whitespace): + Json::FastWriter writer; + return writer.write(msg); + #else + // Serialize as human-readable string (pretty-printed): + return msg.toStyledString(); + #endif } |