mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-15 12:51:32 +01:00
Don't use pretty-printed JSON when uploading to bytebin for web apps
This commit is contained in:
parent
c8b89f245e
commit
ab009ed110
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user