Closed pysjp closed 7 years ago
Hi
Can you give me more information on this issue. It seems to me, you are tring to read message from NATS and failed somehow? And you believed there is a problem in serializing or deserializing json, right?
From the logs, there are no errors and I can't identify the problem. I'll make a quick test ASAP. Mean while more information will be appreciated.
thanks for your reply,When I add following option in JSONs.java,it can be serialized to json corrected with right value. Mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY); BTW,when the message which type is subscrble is serializing to json,the field of payload is missing. I can not find the way to fixed it. hope for your reply
Bug fixes commit d579c22
thanks,it works well now
the value of message is filled by fromMqttMessage,but when JSONs.Mapper.writeValueAsBytes,its return empty json data.
the trace logs as follows:
2016-10-07 16:19:53.061 [nioEventLoopGroup-6-1] TRACE c.g.l.m.c.n.NATSClusterImpl sendToApplication 135 - sendToApplication Message[fixedHeader=MqttFixedHeader[messageType=SUBSCRIBE, dup=false, qos=AT_LEAST_ONCE, retain=false, remainingLength=9], additionalHeader=MqttAdditionalHeader[version=MQTT_3_1, clientId=1234, userName=null, brokerId=1], variableHeader=MqttPacketIdVariableHeader[packetId=1], payload=] 2016-10-07 16:19:53.062 [nioEventLoopGroup-6-1] TRACE c.g.l.m.c.n.NATSClusterImpl sendToApplication 136 - sendToApplication {} 2016-10-07 16:19:53.062 [nioEventLoopGroup-6-1] TRACE c.g.l.m.c.n.NATSClusterImpl sendToApplication 137 - sendToApplication [123, 125]