Skip to content

Commit 7ac9105

Browse files
committed
Fix string deserialization
1 parent 73935dd commit 7ac9105

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OpacityCore/src/main/java/com/opacitylabs/opacitycore/OpacityCore.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ object OpacityCore {
159159
// return withContext(Dispatchers.IO) { getGustoPayrollAdminIdNative() }
160160
// }
161161

162-
fun parseJsonElementToAny(jsonElement: JsonElement): Any {
162+
private fun parseJsonElementToAny(jsonElement: JsonElement): Any {
163163
return when (jsonElement) {
164164
is JsonPrimitive -> {
165165
when {
166-
jsonElement.isString -> jsonElement.toString()
166+
jsonElement.isString -> jsonElement.content
167167
jsonElement.intOrNull != null -> jsonElement.int
168168
jsonElement.booleanOrNull != null -> jsonElement.boolean
169169
jsonElement.doubleOrNull != null -> jsonElement.double

0 commit comments

Comments
 (0)