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

This commit is contained in:
Luck 2021-02-05 12:44:48 +00:00
parent c8b89f245e
commit ab009ed110
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
3 changed files with 3 additions and 3 deletions

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}