Hi, I have a requirement to uppercase certain values during serialisation, so I've created a custom serialiser that accepts an argument within the constructor as I only want this code executing when I use the ObjectMapper.
So in my code when I execute: ObjectMapper mapper = new ObjectMapper().registerModule(new SimpleModule().addSerializer(new UpperCaseSerializer(true))); String serialized = mapper.writeValueAsString(person); it appears that the custom serialiser fires for any property that doesn't have @JsonSerialize(using = UpperCaseSerializer.class) attached? So if I have 10 properties, and this annotation is on only 1, I end up with a string where 9 of the values are uppercase and the one I actually want is lowercase? Is there something I'm missing with this? Any help would be much appreciated. -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/49ddf8ff-6f84-43d2-9208-4acda80042ad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
