Skip to main content

parse_field_path

Function parse_field_path 

Source
pub fn parse_field_path(path: &str) -> Result<Vec<String>, Error>
Expand description

Parse a field path that may contain quoted field names.

Field names containing dots must be quoted with backticks. For example: “parent.child.with.dot” parses to [“parent”, “child.with.dot”]

Backticks within quoted fields must be escaped by doubling them. For example: “field``with``backticks” represents the field name “fieldwithbackticks”

Returns an error if:

  • The input path is empty
  • The path has malformed quotes (unclosed, misplaced, etc.)
  • The path has empty segments (e.g., “parent..child” or “parent.”)

The result is guaranteed to contain at least one element.