Class: JsonPointerIterator

vertx-js/json_pointer_iterator~ JsonPointerIterator

new JsonPointerIterator()

Source:

Methods

appendArrayElement(currentValue, value) → {boolean}

Append array element
Parameters:
Name Type Description
currentValue Object
value Object
Source:
Returns:
true if the operation is successful
Type
boolean

getArrayElement(currentValue, i) → {Object}

Move the iterator the the array element at specified index
Parameters:
Name Type Description
currentValue Object
i number array index
Source:
Returns:
the request array element, or null if the method was not able to find it
Type
Object

getObjectParameter(currentValue, key, createOnMissing) → {Object}

Returns the object parameter with specified key.
Parameters:
Name Type Description
currentValue Object
key string object key
createOnMissing boolean If the current value is an object that doesn't contain the key, put an empty object at provided key
Source:
Returns:
the requested object parameter, or null if the method was not able to find it
Type
Object

isArray(currentValue) → {boolean}

Parameters:
Name Type Description
currentValue Object
Source:
Returns:
true if the current value is a queryable array
Type
boolean

isNull(currentValue) → {boolean}

Parameters:
Name Type Description
currentValue Object
Source:
Returns:
true if the current value is null/empty
Type
boolean

isObject(currentValue) → {boolean}

Parameters:
Name Type Description
currentValue Object
Source:
Returns:
true if the current value is a queryable object
Type
boolean

objectContainsKey(currentValue, key) → {boolean}

Parameters:
Name Type Description
currentValue Object
key string object key
Source:
Returns:
true if current value is a queryable object that contains the specified key
Type
boolean

writeArrayElement(currentValue, i, value) → {boolean}

Write array element at specified index
Parameters:
Name Type Description
currentValue Object
i number
value Object
Source:
Returns:
true if the operation is successful
Type
boolean

writeObjectParameter(currentValue, key, value) → {boolean}

Write object parameter at specified key
Parameters:
Name Type Description
currentValue Object
key string
value Object
Source:
Returns:
true if the operation is successful
Type
boolean