I have a class that I use for things that I pull from Kafka or store in Redis. However, I just want to remove a couple of sensitive entries from it before I send it to the user.
One approach I had was to create a separate return class and copy each field one at a time, but I switched to a different approach in that I use object mapper to convert it to a map and then just strip off the element.
However, I was wondering if there was a nicer way.
I can't use @JsonIgnore as I am using it with @JsonProperty right now.