UNPKG

@winglet/json

Version:

TypeScript library for safe and efficient JSON data manipulation with RFC 6901 (JSON Pointer) and RFC 6902 (JSON Patch) compliance, featuring prototype pollution protection and immutable operations

21 lines (20 loc) 733 B
/** * Special character constants used in JSONPointer expressions * Based on RFC 6901 specification * @see https://datatracker.ietf.org/doc/html/rfc6901 */ export declare const JSONPointer: { /** * 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: "/"; }; export type JSONPointer = (typeof JSONPointer)[keyof typeof JSONPointer];