Reputation: 1191
I have a JsonParser defined in the class. I will be traversing through it. But when I do that, I will need to get the full path of the current node I am in. What is the best way to extract the full path without affecting the performance. Is there an API in Jackson that already does that?
Upvotes: 5
Views: 3171
Reputation: 116630
You can get context information with JsonParser.getParsingContext()
. Or, if you want location relative to input source (line, column), you can use JsonParser.getLocation()
.
Upvotes: 0