== 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:../../yardoc/Vertx/JsonPointer.html[JsonPointer]` using
a string, a URI or manually appending paths:

[source,java]
----
require 'vertx/json_pointer'
# Build a pointer from a string
pointer1 = Vertx::JsonPointer.from("/hello/world")
# Build a pointer manually
pointer2 = Vertx::JsonPointer.create().append("hello").append("world")

----

After instantiating your pointer, use `link:../../yardoc/Vertx/JsonPointer.html#query_json-instance_method[queryJson]` to query
a JSON value. You can update a Json Value using `link:../../yardoc/Vertx/JsonPointer.html#write_json-instance_method[writeJson]`:

[source,java]
----
# Query a JsonObject
result1 = objectPointer.query_json(jsonObject)
# Query a JsonArray
result2 = arrayPointer.query_json(jsonArray)
# Write starting from a JsonObject
objectPointer.write_json(jsonObject, "new element")
# Write starting from a JsonObject
arrayPointer.write_json(jsonArray, "new element")

----

You can use Vert.x Json Pointer with any object model by providing a custom implementation of `link:../../yardoc/Vertx/JsonPointerIterator.html[JsonPointerIterator]`