'Can I get a TreeNode supplied to my POJO?

I'm reasonably familiar with the ins and outs of Jackson.

Suppose I have a POJO controlled by Jackson annotations.

Is there an existing annotation recipe I could use that would cause Jackson to supply me with the TreeNode (or JsonNode) representation of my POJO?

Making this up entirely, something like:

@JacksonTreeNode // made-up
private void setTreeNode(TreeNode nodeRepresentingThisVeryObject) {
  this.treeNode = nodeRepresentingThisVeryObject;
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source