Json – parse generic sealed class in kotlin using jackson
I have the following generic sealed class representing the status of network response. @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "status") @JsonSubTypes( value = [ JsonSubTypes.Type(value = Response.OK::class, name = "OK"), JsonSubTypes.Type(value = Response.Error::class, name = "ERROR"), ] )…