From 6a85aad6844d2407afc2652fd707675d6aca225d Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 17 Aug 2019 22:44:08 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/utils/GsonExtensions.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/utils/GsonExtensions.kt b/app/src/main/java/io/legado/app/utils/GsonExtensions.kt index bccf6e6ba..e1a099eba 100644 --- a/app/src/main/java/io/legado/app/utils/GsonExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/GsonExtensions.kt @@ -2,11 +2,15 @@ package io.legado.app.utils import com.google.gson.Gson import com.google.gson.GsonBuilder -import com.google.gson.JsonParser import com.google.gson.reflect.TypeToken import org.jetbrains.anko.attempt -val GSON: Gson by lazy { GsonBuilder().create() } +val GSON: Gson by lazy { + GsonBuilder() + .disableHtmlEscaping() + .setPrettyPrinting() + .create() +} inline fun genericType() = object : TypeToken() {}.type