You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gossip.apache.org by "Edward Capriolo (JIRA)" <ji...@apache.org> on 2017/02/25 19:06:44 UTC

[jira] [Created] (GOSSIP-61) Make a proper Jackson module

Edward Capriolo created GOSSIP-61:
-------------------------------------

             Summary: Make a proper Jackson module
                 Key: GOSSIP-61
                 URL: https://issues.apache.org/jira/browse/GOSSIP-61
             Project: Gossip
          Issue Type: Bug
            Reporter: Edward Capriolo




I noticed there was a problem with the way we are using Jackson to serialize some things.

See here:
https://github.com/apache/incubator-gossip/pull/36/files#diff-936a81be82f0bea048f1ca091413d8fa

First, an Integer it magically becomes a long! 

Second, if a key to a map is an integer it will become a string! This is because numbers are not keys in json.

Third any type that implements Set will automatically be serialized like an Array/Set.  

As a work around I made all the tests send strings. I also removed the set interface from OrSet and GrowOnlySet so that I can control the serialization.

If we can understand this:
https://github.com/FasterXML/jackson-datatype-guava/blob/master/src/main/java/com/fasterxml/jackson/datatype/guava/ser/MultimapSerializer.java

I think we have a better chance of getting the types to serialize/serialize correctly.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)