PathParser

dev.constructive.eo.jsoniter.PathParser
object PathParser

Parser for the JSONPath subset we accept in JsoniterPrism / JsoniterTraversal. Grammar:

 path  := '$' (step)*
 step  := '.' ident | '[' int ']' | '[*]'
 ident := [A-Za-z_][A-Za-z_0-9]*
 int   := [0-9]+

[*] is the wildcard step — only meaningful inside a multi-focus JsoniterTraversal; JsoniterPrism rejects paths containing it at construction. Filters / recursive descent are still out of scope.

Attributes

Source
PathParser.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
PathParser.type

Members list

Grouped members

Parser

def parse(input: String): Either[String, List[PathStep]]

Parse a path string into the step list, or return a human-readable error.

Parse a path string into the step list, or return a human-readable error.

Attributes

Source
PathParser.scala