JSONPointer
JSON Pointer defines a string format for identifying a specific value within a JSON document.
This class holds methods for manipulation of pointers.
For more information:
Static Method Summary
| Static Public Methods | ||
| public static |
ofString(str: string): JSONPointer parse str and return JSONPointer |
|
| public static |
ofTokens(tokens: *): * |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(opts: Object) JSONPointer constructors |
|
Member Summary
| Public Members | ||
| public |
tokens: * |
|
Method Summary
| Public Methods | ||
| public |
concat(sub: JSONPointer): JSONPointer concat two JSONPointer |
|
| public |
get first token |
|
| public |
get last token |
|
| public |
return length of token array |
|
| public |
slice(): JSONPointer slice JSONPointer |
|
| public |
get immutable js string representation |
|
| public |
get rfc string representation |
|
Static Public Methods
public static ofString(str: string): JSONPointer source
parse str and return JSONPointer
If x starts with '/' create will treat x as a JSONPointer. All other string will be treated like immutable js pointer (eg.: 'foo.bar')
Params:
| Name | Type | Attribute | Description |
| str | string | pointer string |
Public Constructors
Public Members
public tokens: * source
Public Methods
public concat(sub: JSONPointer): JSONPointer source
concat two JSONPointer
Params:
| Name | Type | Attribute | Description |
| sub | JSONPointer | the pointer to concat |
public slice(): JSONPointer source
slice JSONPointer
slice has the same signature like Array.prototype.slice.