Riccardo Montagnin
02/08/2019, 10:53 AMInvalidDefinitionException - (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
I'm installing the feature as follows:
install(ContentNegotiation) {
jackson {
// Set how the dates should be handled
dateFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").apply {
timeZone = TimeZone.getTimeZone("UTC")
}
// Do not serialize null values
setSerializationInclusion(JsonInclude.Include.NON_NULL)
// Do not worry about unknown properties, ignoring them
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
// If we receive an empty object, treat it as null
enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT)
//accept also lowercase value in enum fields
enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS)
}
}
Every time I do something like call.receive<MyClass>()
I get that error. How could I resolve the issue?mp
02/08/2019, 2:19 PMRiccardo Montagnin
02/08/2019, 2:50 PMmp
02/08/2019, 4:46 PMRiccardo Montagnin
02/08/2019, 4:59 PMdata class AcceptanceData(
@field:JsonProperty("did") val id: Did,
@field:JsonProperty("email") val email: String,
@field:JsonProperty("type") val type: String,
@field:JsonProperty("information") val information: User.Information,
@field:JsonProperty("authentication_key_info") val authentication_key_info: APIKeyInfo,
@field:JsonProperty("signing_key_info") val signing_key_info: APIKeyInfo,
@field:JsonProperty("encryption_key_info") val encryption_key_info: APIKeyInfo
)
mp
02/08/2019, 5:58 PMRiccardo Montagnin
02/08/2019, 7:24 PMmp
02/08/2019, 7:53 PMjackson
helperRiccardo Montagnin
02/08/2019, 8:05 PMmp
02/14/2019, 1:58 PM