fred.deschenes
10/18/2017, 7:16 PMfred.deschenes
10/18/2017, 7:16 PMA
thoughjoscha.alisch
10/18/2017, 7:45 PMfstn
10/19/2017, 5:08 AMreturn if(registeredNodes[flowName]!= null) registeredNodes[flowName]!![nodeId]
?: throw UnableToFindRegisterNodeException(flowName,nodeId)
else throw UnableToFindRegisterNodeException(flowName,nodeId)
😇
with val registeredNodes = mutableMapOf<String,MutableMap<String,Node>>()
karelpeeters
10/19/2017, 5:31 AMnodes[flowName]?.get(nodeId) ?: throw ...
fstn
10/19/2017, 5:33 AMJack
10/19/2017, 11:57 AMJack
10/19/2017, 11:57 AMJack
10/19/2017, 11:57 AMkarelpeeters
10/19/2017, 11:59 AMJack
10/19/2017, 12:00 PMfstn
10/19/2017, 3:55 PM@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
data class FacebookRequest(
@JsonProperty("recipient") val recipient: RequestRecipient,
@JsonProperty("message") val message: RequestMessage? = null,
@JsonProperty("notification_type") val notificationType: NotificationType?,
@JsonProperty("sender_action") val senderAction: SenderAction? = null
)
I try to serialize it with:
(Json.encode(facebookRequest).toJsonAsBytes()
And I got :
io.vertx.core.json.EncodeException: Failed to encode as JSON: No serializer found for class java.lang.Object and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.github.parkee.messenger.model.request.FacebookRequest["message"]->com.github.parkee.messenger.model.request.RequestMessage["quickReplies"]->java.util.ArrayList[0]->com.github.parkee.messenger.model.request.quickreply.QuickReply["payload"])
at io.vertx.core.json.Json.encode(Json.java:65)
Any ideas?
I tried that:
Json.mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY)
I also try that:
val mapper = ObjectMapper().registerModule(KotlinModule())
fred.deschenes
10/19/2017, 5:11 PMregisterModule(KotlinModule())
on the actual mapper used by vert.xfstn
10/19/2017, 7:04 PMval mapper = ObjectMapper().registerModule(KotlinModule())
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
it works but I’m not sure that is the good way to dolex
10/20/2017, 3:10 AMObjectMapper().findAndRegisterModules()
lex
10/20/2017, 3:10 AMfstn
10/20/2017, 4:58 AMmamba
10/21/2017, 9:26 PMkarelpeeters
10/21/2017, 9:29 PMmamba
10/21/2017, 9:38 PMkarelpeeters
10/21/2017, 9:39 PMmamba
10/21/2017, 9:39 PMamatos
10/21/2017, 11:36 PMamatos
10/21/2017, 11:37 PMamatos
10/21/2017, 11:40 PMkarelpeeters
10/21/2017, 11:46 PMkarelpeeters
10/21/2017, 11:47 PMamatos
10/21/2017, 11:52 PMamatos
10/21/2017, 11:54 PMamatos
10/21/2017, 11:55 PM