== Json Pointers

Vert.x provides an implementation of https://tools.ietf.org/html/rfc6901[Json Pointers from RFC6901].
You can use pointers both for querying and for writing. You can build your `link:../../apidocs/io/vertx/core/json/pointer/JsonPointer.html[JsonPointer]` using
a string, a URI or manually appending paths:

[source,java]
----
// Build a pointer from a string
def pointer1 = JsonPointer.from("/hello/world")
// Build a pointer manually
def pointer2 = JsonPointer.create().append("hello").append("world")

----

After instantiating your pointer, use `link:../../apidocs/io/vertx/core/json/pointer/JsonPointer.html#queryJson-java.lang.Object-[queryJson]` to query
a JSON value. You can update a Json Value using `link:../../apidocs/io/vertx/core/json/pointer/JsonPointer.html#writeJson-java.lang.Object-java.lang.Object-[writeJson]`:

[source,java]
----
// Query a JsonObject
def result1 = objectPointer.queryJson(jsonObject)
// Query a JsonArray
def result2 = arrayPointer.queryJson(jsonArray)
// Write starting from a JsonObject
objectPointer.writeJson(jsonObject, "new element")
// Write starting from a JsonObject
arrayPointer.writeJson(jsonArray, "new element")

----

You can use Vert.x Json Pointer with any object model by providing a custom implementation of `link:../../apidocs/io/vertx/core/json/pointer/JsonPointerIterator.html[JsonPointerIterator]`