Don't use pretty-printed JSON when uploading to bytebin for web apps

This commit is contained in:
Luck committed 2021-02-05 12:44:48 +00:00
1 parent c8b89f245e
commit ab009ed110
3 files changed
+3 -3

No files matched your search

@@ -180,7 +180,7 @@ public class TreeView {
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(bytesOut), StandardCharsets.UTF_8)) {
GsonProvider.prettyPrinting().toJson(payload, writer);
GsonProvider.normal().toJson(payload, writer);
} catch (IOException e) {
e.printStackTrace();
}
@@ -314,7 +314,7 @@ public class VerboseListener {
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(bytesOut), StandardCharsets.UTF_8)) {
GsonProvider.prettyPrinting().toJson(payload, writer);
GsonProvider.normal().toJson(payload, writer);
} catch (IOException e) {
e.printStackTrace();
}
@@ -155,7 +155,7 @@ public class WebEditorRequest {
public byte[] encode() {
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(bytesOut), StandardCharsets.UTF_8)) {
GsonProvider.prettyPrinting().toJson(this.payload, writer);
GsonProvider.normal().toJson(this.payload, writer);
} catch (IOException e) {
e.printStackTrace();
}