Skip to content

Commit

Permalink
update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Apr 16, 2021
1 parent b965e5f commit 093d63b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import java.math.BigDecimal
@Serializer(forClass = BigDecimal::class)
object BigDecimalAdapter : KSerializer<BigDecimal> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigDecimal", PrimitiveKind.STRING)

override fun deserialize(decoder: Decoder): BigDecimal = BigDecimal(decoder.decodeString())

override fun serialize(encoder: Encoder, value: BigDecimal) = encoder.encodeString(value.toPlainString())
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import java.math.BigInteger
@Serializer(forClass = BigInteger::class)
object BigIntegerAdapter : KSerializer<BigInteger> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigInteger", PrimitiveKind.STRING)

override fun deserialize(decoder: Decoder): BigInteger {
return BigInteger(decoder.decodeString())
}
Expand Down

0 comments on commit 093d63b

Please sign in to comment.