Let say I have a String {"foo": "bar"}
and a Map Map("hello" -> "world")
.
Using Jackson, how do I combine them into a String {"foo": "bar", "hello": "world"}
without deserializing the foo-bar String first?
The foo-bar String comes from another system (trusted, will return valid JSON String), and it's inefficient to deserialize it into Map just to add a few properties, and then serializing it back to String.
Replace the end brace with a comma.
Produce the JSON string for your map.
Remove the start brace from your map JSON.
Concatinate the strings.