@canard/schema-form
Version:
React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components
44 lines (43 loc) • 1.68 kB
TypeScript
export declare const JSONPointer: {
/**
* Root pointer representing the entire document (empty string `''`)
* @note In JSON String representation, `''` refers to the whole document.
* @note In URI Fragment representation, `#` alone refers to the whole document.
* @note `/` alone does NOT represent root - it references an empty string key `""`.
* @see https://datatracker.ietf.org/doc/html/rfc6901#section-5
*/
readonly Root: "";
/**
* Starting character of URI fragment identifier (`#`)
* @note `#` or `''` can be used as a root pointer.
* @notice if you not want to use `#` as a root pointer, just start with `/`.
* @see https://datatracker.ietf.org/doc/html/rfc6901#section-6
*/
readonly Fragment: "#";
/**
* Path separator character (`/`)
* @see https://datatracker.ietf.org/doc/html/rfc6901#section-3
*/
readonly Separator: "/";
/**
* Parent node (`..`)
* @note This is not a official JSONPointer syntax, but it is used in some implementations.
*/
readonly Parent: "..";
/**
* Current node (`.`)
* @note This is not a official JSONPointer syntax, but it is used in some implementations.
*/
readonly Current: ".";
/**
* All index operator (`*`)
* @note This is not a official JSONPointer syntax, but it is used in some implementations.
*/
readonly Index: "*";
/**
* Special symbol for Context (`@`)
* @note This is not a official JSONPointer syntax, but it is used in some implementations.
*/
readonly Context: "@";
};
export type JSONPointer = (typeof JSONPointer)[keyof typeof JSONPointer];