Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JSONPathClass

Hierarchy

  • JSONPathClass

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Static cache

cache: any

Exposes the cache object for those who wish to preserve and reuse it for optimization purposes.

Methods

evaluate

Static toPathArray

  • toPathArray(path: string): string[]
  • Accepts a normalized or unnormalized path as string and converts to an array: for example, ['$', 'aProperty', 'anotherProperty'].

    Parameters

    • path: string

    Returns string[]

Static toPathString

  • toPathString(path: string[]): string
  • Accepts a path array and converts to a normalized path string. The string will be in a form like: $['aProperty']['anotherProperty][0]. The JSONPath terminal constructions ~ and ^ and type operators like @string() are silently stripped.

    Parameters

    • path: string[]

    Returns string

Static toPointer

  • toPointer(path: string[]): any
  • Accepts a path array and converts to a JSON Pointer.

    The string will be in a form like: /aProperty/anotherProperty/0 (with any ~ and / internal characters escaped as per the JSON Pointer spec).

    The JSONPath terminal constructions ~ and ^ and type operators like @string() are silently stripped.

    Parameters

    • path: string[]

    Returns any

Generated using TypeDoc