From 06d41315822af6508d0274ab0e6de1da9806703f Mon Sep 17 00:00:00 2001 From: OMGeeky <> Date: Thu, 17 Jul 2025 20:33:46 +0200 Subject: [PATCH] Add toJsonString method for JsonSerializable objects --- src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java b/src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java index 7975583..437eb8e 100644 --- a/src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java +++ b/src/com/gpl/rpg/atcontentstudio/utils/FileUtils.java @@ -2,6 +2,7 @@ package com.gpl.rpg.atcontentstudio.utils; import com.gpl.rpg.atcontentstudio.Notification; import com.gpl.rpg.atcontentstudio.io.JsonPrettyWriter; +import com.gpl.rpg.atcontentstudio.io.JsonSerializable; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; @@ -18,7 +19,9 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; public class FileUtils { - + public static String toJsonString(JsonSerializable jsonSerializable) { + return toJsonString(jsonSerializable.toMap()); + } public static String toJsonString(Map json) { StringWriter writer = new JsonPrettyWriter(); try {