Implementation of RFC6901 Json Pointers. This wraps io.vertx.core.json.pointer.JsonPointer and makes it behave more Scala-like.
Value parameters
- internal
-
the wrapped Vert.x io.vertx.core.json.pointer.JsonPointer
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
This pointer appended with String tokens.
This pointer appended with String tokens.
Value parameters
- tokens
-
the tokens to append which must not contain escaped characters
Attributes
This JsonPointer with the given index appended as reference token.
This JsonPointer with the given index appended as reference token.
Note: This function does not mutate this JsonPointer.
Attributes
This JsonPointer with the given other JsonPointer appended.
This JsonPointer with the given other JsonPointer appended.
Note: This function does not mutate this JsonPointer.
Attributes
Return the underlying URI without the fragment
Return the underlying URI without the fragment
Attributes
Attributes
- Returns
-
true
if the pointer is local (URI with only fragment)
Attributes
- Returns
-
true
if this pointer is a parent of the givenchild
. For instance,"/properties"
pointer is parent pointer of"/properties/parent"
Attributes
- Returns
-
true
if the pointer is a root pointer
Evaluates to the parent pointer.
Evaluates to the parent pointer.
Attributes
Query the given jsonObject
, expecting the result to be of type T.
Query the given jsonObject
, expecting the result to be of type T.
Note: If this pointer is a root pointer ("") and T is JsonObject, this function returns the provided JSON.
Note: JSON numbers will always result in the Double Scala type. The following JSON to Scala mappings apply:
-
true/false
-Boolean
-
number
-Double
-
string
-String
-
array
- JsonArray -
object
- JsonObject -
null
- will always result inNone
Type parameters
- T
-
the expected result type of the query
Value parameters
- jsonObject
-
the JSON to query
Attributes
- Returns
-
Some[T]
if the requested value exists and has the expected type T, otherwiseNone
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
Build a URI representation of the JSON Pointer
Write newElement
to the given json
using this pointer. The path token "-" is handled as append to the end of an array.
Write newElement
to the given json
using this pointer. The path token "-" is handled as append to the end of an array.
Note: This function does not mutate the given json
.
Note: If this is a root pointer, newElement
will be returned.
Type parameters
- J
-
either a JsonObject or a JsonArray
Value parameters
- createIfMissing
-
creates a new JsonObject when the parent object key is missing
- json
-
the JSON to write to
- newElement
-
the new element to write
Attributes
- Returns
-
Some[J]
if the write was successful,None
if not
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product