mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-08-26 15:54:22 +02:00
Don't use pretty-printed JSON when uploading to bytebin for web apps
This commit is contained in:
@@ -180,7 +180,7 @@ public class TreeView {
|
|||||||
|
|
||||||
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
|
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
|
||||||
try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(bytesOut), StandardCharsets.UTF_8)) {
|
try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(bytesOut), StandardCharsets.UTF_8)) {
|
||||||
GsonProvider.prettyPrinting().toJson(payload, writer);
|
GsonProvider.normal().toJson(payload, writer);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@@ -314,7 +314,7 @@ public class VerboseListener {
|
|||||||
|
|
||||||
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
|
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
|
||||||
try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(bytesOut), StandardCharsets.UTF_8)) {
|
try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(bytesOut), StandardCharsets.UTF_8)) {
|
||||||
GsonProvider.prettyPrinting().toJson(payload, writer);
|
GsonProvider.normal().toJson(payload, writer);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@@ -155,7 +155,7 @@ public class WebEditorRequest {
|
|||||||
public byte[] encode() {
|
public byte[] encode() {
|
||||||
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
|
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
|
||||||
try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(bytesOut), StandardCharsets.UTF_8)) {
|
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) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user