remove

fun remove(path: String)(source)

Removes the element identified by path from this object.

Parses path as a JSON Pointer string and delegates to remove.

Parameters

path

The JSON Pointer path string identifying the element to remove.

Throws

if the path is invalid, the pointer is the root, the target key is absent, or navigation through an intermediate node fails.

if an intermediate node is a JsonArray and the array index in the pointer path is out of bounds.


fun remove(pointer: JsonPointer)(source)

Removes the element identified by pointer from this object.

Navigates intermediate nodes as needed. At the leaf, the identified key is removed from the object. The pointer must not be the root pointer.

Parameters

pointer

The JsonPointer identifying the element to remove.

Throws

if the pointer is the root, the target key is absent, or navigation through an intermediate node fails.

if an intermediate node is a JsonArray and the array index in the pointer path is out of bounds.