interface Location {
    isAtPropertyKey: boolean;
    matches: ((patterns: JSONPath) => boolean);
    path: JSONPath;
    previousNode?: Node;
}

Properties

isAtPropertyKey: boolean

If set, the location's offset is at a property key.

matches: ((patterns: JSONPath) => boolean)

Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). '*' will match a single segment of any property name or index. '**' will match a sequence of segments of any property name or index, or no segment.

path: JSONPath

The path describing the location in the JSON document. The path consists of a sequence of strings representing an object property or numbers for array indices.

previousNode?: Node

The previous property key or literal value (string, number, boolean or null) or undefined.