Getting this on wasm (but not other targets): ```c...
# webassembly
r
Getting this on wasm (but not other targets):
Copy code
console.js:36 IllegalStateException: Sealed class 'nav.NavConfig.VehicleDetails' cannot be serialized as base class 'nav.NavConfig' because it has property name that conflicts with JSON class discriminator 'type'. You can either change class discriminator in JsonConfiguration, rename property with @SerialName annotation or fall back to array polymorphism
class:
Copy code
@Serializable data class VehicleDetails(val vehicleId: Int?, val type: VehicleType?) : NavConfig(Paths.VEHICLE_DETAILS.withID(vehicleId))
renaming
type
to
vehicleType
fixes the issue Kotlin
2.1.0
, kotlinx-serialization
1.7.3
a
Could you please duplicate the question in the #C7A1U5PTM channel?
1