class JsonPointer extends AnyRef
Implementation of RFC6901 Json Pointers.
- Alphabetic
- By Inheritance
- JsonPointer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new JsonPointer(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
append(pointer: JsonPointer): JsonPointer
Append all tokens of
pointerto this pointer
Note: The base URI of this pointer will remain untouched * @param pointer other pointerAppend all tokens of
pointerto this pointer
Note: The base URI of this pointer will remain untouched * @param pointer other pointer- returns
a reference to this, so the API can be used fluently
-
def
append(tokens: Buffer[String]): JsonPointer
Append an unescaped list of
tokensto JsonPointer
Note: If you provide escaped paths the behaviour is undefined * @param tokens unescaped reference tokensAppend an unescaped list of
tokensto JsonPointer
Note: If you provide escaped paths the behaviour is undefined * @param tokens unescaped reference tokens- returns
a reference to this, so the API can be used fluently
-
def
append(index: Int): JsonPointer
Append the
indexas reference token to JsonPointer * @return a reference to this, so the API can be used fluently -
def
append(token: String): JsonPointer
Append an unescaped
tokento this pointer
Note: If you provide escaped path the behaviour is undefined * @param token the unescaped reference tokenAppend an unescaped
tokento this pointer
Note: If you provide escaped path the behaviour is undefined * @param token the unescaped reference token- returns
a reference to this, so the API can be used fluently
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
copy(): JsonPointer
Copy a JsonPointer * @return a copy of this pointer
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isLocalPointer(): Boolean
Return
trueif the pointer is local (URI with only fragment) -
def
isParent(child: JsonPointer): Boolean
Return
trueif this pointer is a parent pointer ofchild.Return
trueif this pointer is a parent pointer ofchild.
For instance"/properties"pointer is parent pointer of"/properties/parent" -
def
isRootPointer(): Boolean
Return
trueif the pointer is a root pointer -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parent(): JsonPointer
Remove last reference token of this pointer * @return a reference to this, so the API can be used fluently
-
def
query(objectToQuery: AnyRef, iterator: JsonPointerIterator): Option[AnyRef]
Query
objectToQueryusing the provided io.vertx.scala.core.json.pointer.JsonPointerIterator.Query
objectToQueryusing the provided io.vertx.scala.core.json.pointer.JsonPointerIterator.
If you need to query Vert.x json data structures, use io.vertx.scala.core.json.pointer.JsonPointer#queryJson
Note: if this pointer is a root pointer, this function returns the provided object * @param objectToQuery the object to query- iterator
the json pointer iterator that provides the logic to access to the objectToQuery
- returns
null if pointer points to not existing value, otherwise the requested value
-
def
queryJson(jsonElement: AnyRef): Option[AnyRef]
Query
jsonElement.Query
jsonElement.
Note: if this pointer is a root pointer, this function returns the provided json element * @param jsonElement the json element to query- returns
null if pointer points to not existing value, otherwise the requested value
-
def
queryJsonOrDefault(jsonElement: AnyRef, defaultValue: AnyRef): Option[AnyRef]
Query
jsonElement.Query
jsonElement. If the query result is null, returns the default.
Note: if this pointer is a root pointer, this function returns the provided object * @param jsonElement the json element to query- defaultValue
default value if query result is null
- returns
null if pointer points to not existing value, otherwise the requested value
-
def
queryOrDefault(objectToQuery: AnyRef, iterator: JsonPointerIterator, defaultValue: AnyRef): AnyRef
Query
objectToQueryusing the provided io.vertx.scala.core.json.pointer.JsonPointerIterator.Query
objectToQueryusing the provided io.vertx.scala.core.json.pointer.JsonPointerIterator. If the query result is null, returns the default.
If you need to query Vert.x json data structures, use io.vertx.scala.core.json.pointer.JsonPointer#queryJsonOrDefault
Note: if this pointer is a root pointer, this function returns the provided object * @param objectToQuery the object to query- iterator
the json pointer iterator that provides the logic to access to the objectToQuery
- defaultValue
default value if query result is null
- returns
null if pointer points to not existing value, otherwise the requested value
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
Build a string representation of the JSON Pointer
Build a string representation of the JSON Pointer
- Definition Classes
- JsonPointer → AnyRef → Any
-
def
tracedQuery(objectToQuery: AnyRef, iterator: JsonPointerIterator): Buffer[AnyRef]
Query
objectToQuerytracing each element walked during the query, including the first and the result (if any).
The first element of the list is objectToQuery and the last is the result, or the element before the first null was encountered * @param objectToQuery the object to queryQuery
objectToQuerytracing each element walked during the query, including the first and the result (if any).
The first element of the list is objectToQuery and the last is the result, or the element before the first null was encountered * @param objectToQuery the object to query- iterator
the json pointer iterator that provides the logic to access to the objectToQuery
- returns
the stream of walked elements
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
write(objectToWrite: AnyRef, iterator: JsonPointerIterator, newElement: AnyRef, createOnMissing: Boolean): AnyRef
Write
newElementinobjectToWriteusing this pointer.Write
newElementinobjectToWriteusing this pointer. The path token "-" is handled as append to end of array
If you need to write in Vert.x json data structures, use io.vertx.scala.core.json.pointer.JsonPointer#writeJson (Object)
* @param objectToWrite object to write- iterator
the json pointer iterator that provides the logic to access to the objectToMutate
- newElement
object to insert
- createOnMissing
create objects when missing a object key or an array index
- returns
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
-
def
writeJson(jsonElement: AnyRef, newElement: AnyRef, createOnMissing: Boolean): AnyRef
Write
newElementinjsonElementusing this pointer.Write
newElementinjsonElementusing this pointer. The path token "-" is handled as append to end of array. * @param jsonElement json to query and write- newElement
json to insert
- createOnMissing
create JsonObject when missing a object key or an array index
- returns
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
-
def
writeJson(jsonElement: AnyRef, newElement: AnyRef): AnyRef
Write
newElementinjsonElementusing this pointer.Write
newElementinjsonElementusing this pointer. The path token "-" is handled as append to end of array. * @param jsonElement json element to query and write- newElement
json to insert
- returns
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