FasterXML / jackson-datatypes-collections

Jackson project that contains various collection-oriented datatype libraries: Eclipse Collections, Guava, HPPC, PCollections
Apache License 2.0
77 stars 52 forks source link

[guava] Java Serialization Support #15

Closed gcooney closed 7 years ago

gcooney commented 7 years ago

Core Jackson has support for serializing ObjectMappers since 2.1. But if you add in the guava module, java serialization no longer works because the guava extensions are not serializable.

gcooney commented 7 years ago

Happy to submit a PR, if there is interest.

cowtowncoder commented 7 years ago

Yes, would be interested since goal (for 2.x... quite possible this will be dropped from 3.x) is to keep ObjectMapper / ObjectReader / ObjectWriter JDK serializable.

gcooney commented 7 years ago

Great! I'll take a stab sometime in the next day or so and submit a PR. I'll throw a vote for keeping support in 3.x. Specific use case here is that Apache Beam requires transformation steps to be serializable.

cowtowncoder commented 7 years ago

@gcooney Ok. Keeping/dropping serializability is up for discussion once 2.9 is done. It's tricky one since it combines practicality (turns out there are many classes that need to be serializable, and even if few require much work it adds up... and is bit fragile) with philosophical (it could be argued it's wrong to make stateful non-data object such as mapper serializable). At the same time, there certainly is a use case of some kind to be able to at least serialize configuration settings in some form -- some way to pass processing settings. These issues do seem most common on streaming data platforms (spark, storm, beam, flink).