File tree 1 file changed +28
-0
lines changed
src/main/java/com/fasterxml/jackson/databind
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,16 @@ public Iterator<String> fieldNames() {
177
177
return EmptyIterator .instance ();
178
178
}
179
179
180
+ /**
181
+ * Method for locating node specified by given JSON pointer instances.
182
+ * Method will never return null; if no matching node exists,
183
+ * will return a node for which {@link #isMissingNode()} returns true.
184
+ *
185
+ * @return Node that matches given JSON Pointer: if no match exists,
186
+ * will return a node for which {@link #isMissingNode()} returns true.
187
+ *
188
+ * @since 2.3
189
+ */
180
190
@ Override
181
191
public final JsonNode at (JsonPointer ptr )
182
192
{
@@ -191,6 +201,24 @@ public final JsonNode at(JsonPointer ptr)
191
201
return n .at (ptr .tail ());
192
202
}
193
203
204
+ /**
205
+ * Convenience method that is functionally equivalent to:
206
+ *<pre>
207
+ * return at(JsonPointer.valueOf(jsonPointerExpression));
208
+ *</pre>
209
+ *<p>
210
+ * Note that if the same expression is used often, it is preferable to construct
211
+ * {@link JsonPointer} instance once and reuse it: this method will not perform
212
+ * any caching of compiled expressions.
213
+ *
214
+ * @param jsonPtrExpr Expression to compile as a {@link JsonPointer}
215
+ * instance
216
+ *
217
+ * @return Node that matches given JSON Pointer: if no match exists,
218
+ * will return a node for which {@link TreeNode#isMissingNode()} returns true.
219
+ *
220
+ * @since 2.3
221
+ */
194
222
@ Override
195
223
public final JsonNode at (String jsonPtrExpr ) {
196
224
return at (JsonPointer .compile (jsonPtrExpr ));
You can’t perform that action at this time.
0 commit comments