granular_configuration_language .yaml.decorators.ref

granular_configuration_language.yaml.decorators.ref.resolve_json_ref(query: str, root: Root) Any[source]

Queries Root using JSON Pointer or JSON Path

JSON Path
  • JSON Path can be used to be a pointer to data or a constructor from data.

  • If the query matches one item, then that one item is returned.

  • If the query matches more than one item, that a tuple of items is returned.

Parameters:
  • query (str) –

    • Starts with $ for a JSON Path query

    • Starts with / for a JSON Pointer

  • root (Root) – Mapping being queried

Raises:
Returns:

Result of the query

Return type:

Any