We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7738cff commit e900794Copy full SHA for e900794
templates/kotlin/src/main/kotlin/io/appwrite/extensions/JsonExtensions.kt.twig
@@ -1,14 +1,9 @@
1
package {{ sdk.namespace | caseDot }}.extensions
2
3
import com.google.gson.Gson
4
-import com.google.gson.GsonBuilder
5
-import com.google.gson.reflect.TypeToken
6
-import {{ sdk.namespace | caseDot }}.json.PreciseNumberAdapter
7
-
8
-val gson = GsonBuilder().registerTypeAdapter(
9
- object : TypeToken<Map<String, Any>>(){}.type,
10
- PreciseNumberAdapter()
11
-).create()
+
+val gson = Gson()
12
fun Any.toJson(): String =
13
gson.toJson(this)
14
0 commit comments