Suppose that you have an application that gets some JSON value as input data, deserializes it, handles it in some way and then returns some other JSON value as a result. And now, suppose that in the input value there is a part that contains arbitrary JSON sub-object that you don't want to deserialize, but you want to include it in the result object.
If your application uses Jackson to work with JSON, you probably know that Jackson has a special annotation to work with raw values (@JsonRawValue). Unfortunately, this annotation can be used only for serialization of raw values but not for deserialization.
In my last project, I faced with the same problem and in this short note, I would like to share with you the solution I have found.
Originally published at dolzhenko.me on August 13, 2017.