Updated on 2026-08-14
This commit is contained in:
parent
b0d9a8957f
commit
4424a8b9b6
5 changed files with 69 additions and 29 deletions
16
app/src/main/java/com/tangem/tap/common/moshi/Adapters.kt
Normal file
16
app/src/main/java/com/tangem/tap/common/moshi/Adapters.kt
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package com.tangem.tap.common.moshi
|
||||
|
||||
import com.squareup.moshi.FromJson
|
||||
import com.squareup.moshi.ToJson
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
class BigDecimalAdapter {
|
||||
@FromJson
|
||||
fun fromJson(value: String) = BigDecimal(value)
|
||||
|
||||
@ToJson
|
||||
fun toJson(value: BigDecimal) = value.toString()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue