From 416e4d4a3f24813dd4cedb1380fabcd173f03af1 Mon Sep 17 00:00:00 2001 From: creme332 <65414576+creme332@users.noreply.github.com> Date: Sat, 10 Aug 2024 20:06:28 +0400 Subject: [PATCH] do not pretty print json for less memory usage --- .../github/creme332/controller/console/SideMenuController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/creme332/controller/console/SideMenuController.java b/src/main/java/com/github/creme332/controller/console/SideMenuController.java index ba8bf81..9506eaf 100644 --- a/src/main/java/com/github/creme332/controller/console/SideMenuController.java +++ b/src/main/java/com/github/creme332/controller/console/SideMenuController.java @@ -247,7 +247,7 @@ private void handleCanvasToJSON() { // convert list of shapes on canvas to json GsonBuilder gsonBuilder = new GsonBuilder(); List shapes = app.getCanvasModel().getShapeManager().getShapes(); - Gson gson = gsonBuilder.setPrettyPrinting().create(); + Gson gson = gsonBuilder.create(); String json = gson.toJson(shapes); // let user choose folder location