Implementation of <a href="https://tools.ietf.org/html/rfc6901">RFC6901 Json Pointers</a>.
package |
Default |
---|
__construct()
append( $arg0) : $this
param $token [string] the unescaped reference token append($token)
Append the index
as reference token to JsonPointer
param $index [integer] append($index)
Append an unescaped list of tokens
to JsonPointer
Note: If you provide escaped paths the behaviour is undefined
param $tokens [array] unescaped reference tokens append($tokens)
Append all tokens of pointer
to this pointer
Note: The base URI of this pointer will remain untouched
param $pointer [JsonPointer] other pointer append($pointer)
string | array | integer | JsonPointer
$this
a reference to this, so the API can be used fluently
copy() : \io\vertx\jphp\core\json\pointer\JsonPointer
create() : \io\vertx\jphp\core\json\pointer\JsonPointer
from( $arg0) : \io\vertx\jphp\core\json\pointer\JsonPointer
string
\io\vertx\jphp\core\json\pointer\JsonPointer
new instance of JsonPointer
isLocalPointer() : boolean
boolean
isParent( $arg0) : boolean
For instance "/properties"
pointer is parent pointer of "/properties/parent"
JsonPointer
boolean
isRootPointer() : boolean
boolean
parent() : $this
$this
a reference to this, so the API can be used fluently
query( $arg0, $arg1) : mixed
mixed
JsonPointerIterator
mixed
null if pointer points to not existing value, otherwise the requested value
queryJson( $arg0) : mixed
mixed
mixed
null if pointer points to not existing value, otherwise the requested value
queryJsonOrDefault( $arg0, $arg1) : mixed
mixed
mixed
mixed
null if pointer points to not existing value, otherwise the requested value
queryOrDefault( $arg0, $arg1, $arg2) : mixed
mixed
JsonPointerIterator
mixed
mixed
null if pointer points to not existing value, otherwise the requested value
toString() : string
string
tracedQuery( $arg0, $arg1) : array
mixed
JsonPointerIterator
array
the stream of walked elements
write( $arg0, $arg1, $arg2, $arg3) : mixed
mixed
JsonPointerIterator
mixed
boolean
mixed
a reference to objectToWrite if the write was completed, a reference to newElement if the pointer is a root pointer, null if the write failed
writeJson( $arg0, $arg1, $arg2 = null) : mixed
param $jsonElement [mixed] json element to query and write param $newElement [mixed] json to insert writeJson($jsonElement, $newElement)
Write newElement
in jsonElement
using this pointer. The path token "-" is handled as append to end of array.
param $jsonElement [mixed] json to query and write param $newElement [mixed] json to insert param $createOnMissing [boolean] create JsonObject when missing a object key or an array index writeJson($jsonElement, $newElement, $createOnMissing)
mixed
mixed
boolean
mixed
a reference to json if the write was completed, a reference to newElement if the pointer is a root pointer, null if the write failed