diff options
author | Mattes D <github@xoft.cz> | 2016-12-16 00:28:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-16 00:28:12 +0100 |
commit | 71e14ee358e59314498e9b46484eff7e34ae6442 (patch) | |
tree | 56ca5369d83504ac063dbc3139f72dc2cdf42610 /src/CompositeChat.cpp | |
parent | APIDump: Load the official undocumented from alternate location. (diff) | |
parent | CompositeChat: Use shorter JSON format. (diff) | |
download | cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.gz cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.bz2 cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.lz cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.xz cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.zst cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.zip |
Diffstat (limited to '')
-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 } |