java.lang.Object
com.darkcollective.relix.value.internal.ValuePath

public final class ValuePath extends Object
Null-propagating navigation into nested Values — the runtime engine behind path access like user.name or items[0].price.

Navigation is optional-chaining: a missing field, an out-of-range index, or a step into a value of the wrong shape yields NullValue, never an error. This lets heterogeneous, schemaless documents be queried without crashing — matching Mongo / jq semantics.

The path syntax accepted by parse(String) is dotted field names with bracketed array indices: "a.b[0].c", "[2].name". This is the utility's own syntax; the query language's surface syntax for paths is a separate concern wired in later.

  • Method Details

    • parse

      public static List<ValuePath.Step> parse(String path)
      Parses a path string into navigation steps.
      Parameters:
      path - a path like "a.b[0].c"; empty/blank yields no steps
      Returns:
      the ordered steps
      Throws:
      IllegalArgumentException - if a [ is unterminated or an index is not an integer