JSON: Serialize Guava Optional
问题 Is there a Json Serializer/Deserializer for com.google.common.base.Optional? Out of the box this doesn't seem to work with Jackson, see below: package com.example; import java.io.IOException; import org.codehaus.jackson.JsonGenerationException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import com.google.common.base.Optional; public class TestClass { public Optional<String> myString; public TestClass() { myString = Optional.of(