Skip to content

Commit 93d7739

Browse files
authored
Convert null values to JsonNull (#15)
If we don't handle null values explicitly, they end up in the `else` case and are converted to strings, which ends up with null values being sent as "null" strings
1 parent 8c3fcf7 commit 93d7739

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/src/main/java/com/segment/analytics/kotlin/destinations/appsflyer/AppsflyerDestination.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ class AppsFlyerDestination(
180180

181181
private fun convertToPrimitive(value: Any?): JsonElement {
182182
return when (value) {
183+
null -> JsonNull
183184
is Boolean -> JsonPrimitive(value)
184185
is Number -> JsonPrimitive(value)
185186
is String -> JsonPrimitive(value)

0 commit comments

Comments
 (0)