I saw a post about inserting new nodes to JsonNode
and encountered two separate answers, but I can't grasp the difference between the two.
From my little experience, ObjectMapper
doesn't allow you to create anything but ObjectNode
and ArrayNode
while JsonNodeFactory
allows you to create a whole bunch of nodes.
Apart from that, what are other differences?
Also, given that ObjectMapper
is considered expensive, I was wondering if the latter way is more efficient?