Unable to deserialize java.awt.color using jackson deserializer
问题 public class TestJacksonColor { public static void main(String [] args) throws IOException { ObjectMapper objectMapper = new ObjectMapper(); Color black = new Color(0, 0, 0); String json = objectMapper.writeValueAsString(black); Color backToObject = objectMapper.readValue(json, Color.class); } } The code attempts to take an java.awt.color class serialize it using jackson objectmapper. Take the resulting json string and deserialize it back to an java.awt.color class. However when doing the