Skip to content

Commit

Permalink
add ID serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
T45K committed Apr 13, 2024
1 parent c38f1c5 commit 4ae5eb2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.expediagroup.graphql.server.types.serializers

import com.expediagroup.graphql.generator.scalars.ID
import kotlinx.serialization.KSerializer
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
Expand Down Expand Up @@ -41,6 +42,7 @@ object AnyNullableKSerializer : KSerializer<Any?> {
is Number -> JsonPrimitive(value)
is Boolean -> JsonPrimitive(value)
is String -> JsonPrimitive(value)
is ID -> JsonPrimitive(value.value)
else -> JsonNull
}

Expand Down

0 comments on commit 4ae5eb2

Please sign in to comment.