I want to merge two ObjectNode together, but with the best complexity. I aware about one way, I can use setAll method, but it returns JsonNode, therefore I must convert it. The best way that I found for the conversion procedure was How to convert JsonNode to ObjectNode. I think this conversion once iterate over Json and maybe we can find a better solution.
The second way that I think is iterate over the second ObjectNode and add one by one to first ObjectNode with put method But both of these solutions have cost, what is the best way to merge?