Package io.kjson.pointer
Object JSONPointer.Companion
-
- All Implemented Interfaces:
public class JSONPointer.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final JSONPointerrootpublic final static JSONPointer.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final JSONPointerof(String tokens)Create a JSONPointerfrom avararglist of tokens.final JSONPointerfrom(String pointer)Create a JSONPointerfrom a JSON Pointer string.final JSONPointerfrom(Array<String> array)Create a JSONPointerfrom an array of tokens.final JSONPointerfrom(List<String> list)Create a JSONPointerfrom a list of tokens.final StringtoString(Array<String> tokens, Integer n)Create the string form of a JSON pointer from the first n tokens in the specified array. final Array<String>parseString(String string)Parse a JSON Pointer string into an array of string tokens. final JSONPointerfromURIFragment(String fragment)Create a JSONPointerfrom a URI fragment.final StringencodeJSONPointerToken(String $self)Encode a string using the character substitutions specified for JSON pointer tokens. final StringdecodeJSONPointerToken(String $self)Decode a string encoded using the character substitutions specified for JSON pointer tokens. final VoidthrowRootParentError()Throw exception for attempt to get parent of root pointer (used by other libraries). final JSONPointergetRoot()The root JSONPointer.-
-
Method Detail
-
of
final JSONPointer of(String tokens)
Create a
JSONPointerfrom avararglist of tokens.
-
from
final JSONPointer from(String pointer)
Create a
JSONPointerfrom a JSON Pointer string.
-
from
final JSONPointer from(Array<String> array)
Create a
JSONPointerfrom an array of tokens.
-
from
final JSONPointer from(List<String> list)
Create a
JSONPointerfrom a list of tokens.
-
toString
final String toString(Array<String> tokens, Integer n)
Create the string form of a JSON pointer from the first n tokens in the specified array.
-
parseString
final Array<String> parseString(String string)
Parse a JSON Pointer string into an array of string tokens.
-
fromURIFragment
final JSONPointer fromURIFragment(String fragment)
Create a
JSONPointerfrom a URI fragment.
-
encodeJSONPointerToken
final String encodeJSONPointerToken(String $self)
Encode a string using the character substitutions specified for JSON pointer tokens.
-
decodeJSONPointerToken
final String decodeJSONPointerToken(String $self)
Decode a string encoded using the character substitutions specified for JSON pointer tokens.
-
throwRootParentError
final Void throwRootParentError()
Throw exception for attempt to get parent of root pointer (used by other libraries).
-
getRoot
final JSONPointer getRoot()
The root
JSONPointer.
-
-
-
-