Added annotation JsonIgnore to control Json serialization on JVM
This commit is contained in:
parent
3e4dfee615
commit
64a1f3afb5
|
@ -84,7 +84,7 @@ kotlin {
|
|||
|
||||
jvmMain {
|
||||
dependencies {
|
||||
|
||||
implementation("com.fasterxml.jackson.core:jackson-annotations:2.15.0")
|
||||
}
|
||||
}
|
||||
jvmTest { }
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
package net.codinux.banking.client.model.config
|
||||
|
||||
expect annotation class JsonIgnore()
|
|
@ -2,6 +2,7 @@ package net.codinux.banking.client.model.response
|
|||
|
||||
import net.codinux.banking.client.model.AccountTransaction
|
||||
import net.codinux.banking.client.model.CustomerAccount
|
||||
import net.codinux.banking.client.model.config.JsonIgnore
|
||||
import net.codinux.banking.client.model.config.NoArgConstructor
|
||||
|
||||
@NoArgConstructor
|
||||
|
@ -9,8 +10,10 @@ class GetAccountDataResponse(
|
|||
val customer: CustomerAccount
|
||||
) {
|
||||
|
||||
@get:JsonIgnore
|
||||
val bookedTransactions: List<AccountTransaction>
|
||||
get() = customer.accounts.flatMap { it.bookedTransactions }.sortedByDescending { it.valueDate }
|
||||
|
||||
|
||||
override fun toString() = customer.toString()
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.codinux.banking.client.model.config
|
||||
|
||||
actual annotation class JsonIgnore
|
|
@ -0,0 +1,6 @@
|
|||
package net.codinux.banking.client.model.config
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
|
||||
@JsonIgnore
|
||||
actual annotation class JsonIgnore
|
|
@ -0,0 +1,3 @@
|
|||
package net.codinux.banking.client.model.config
|
||||
|
||||
actual annotation class JsonIgnore
|
|
@ -0,0 +1,3 @@
|
|||
package net.codinux.banking.client.model.config
|
||||
|
||||
actual annotation class JsonIgnore
|
Loading…
Reference in New Issue