MemberPath

A path used to identify a specific JSON member. Paths can be represented as strings in form "my.json[1].item" where elements are separated by '.' or [<index>]. Reserved characters are escaped using '\'.

Parameters

parent

the parent of this path

name

the name of the member or null if the member is indexed. Pathnames are provided as they were defined when the member was added and do notinclude any name processing.

index

the index of the member or UNINDEXED

Constructors

Link copied to clipboard
constructor(parent: JsonWriter.MemberPath, name: String, index: Int)

Properties

Link copied to clipboard
val UNINDEXED: Int = -1
Indicates that the member has no index.

Functions

Link copied to clipboard
open fun child(index: Int): JsonWriter.MemberPath
Create a new child from this path with the specified index.
Create a new child from this path with the specified name.
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
open fun of(value: String): JsonWriter.MemberPath
Create a new MemberPath instance from the given string.
Link copied to clipboard
Link copied to clipboard
Return a string representation of the path without any escaping.