aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/TemplateUtil.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/util/TemplateUtil.kt')
-rw-r--r--src/main/kotlin/util/TemplateUtil.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/util/TemplateUtil.kt b/src/main/kotlin/util/TemplateUtil.kt
index 11100e9..f4ff37c 100644
--- a/src/main/kotlin/util/TemplateUtil.kt
+++ b/src/main/kotlin/util/TemplateUtil.kt
@@ -5,6 +5,7 @@ package moe.nea.firmament.util
import java.util.*
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerializationStrategy
+import kotlinx.serialization.json.Json
import kotlinx.serialization.serializer
import moe.nea.firmament.Firmament
@@ -61,7 +62,7 @@ object TemplateUtil {
fun <T> encodeTemplate(sharePrefix: String, data: T, serializer: SerializationStrategy<T>): String {
require(sharePrefix.endsWith("/"))
- return intoBase64Encoded(sharePrefix + Firmament.json.encodeToString(serializer, data))
+ return intoBase64Encoded(sharePrefix + Firmament.tightJson.encodeToString(serializer, data))
}
inline fun <reified T : Any> maybeDecodeTemplate(sharePrefix: String, data: String): T? =