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 PathJSON 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:
- Raises:
JSONPathOnlyWorksOnMappings – Raised if
root
is not aMapping
RefMustStartFromRoot – Raised if the
query
does not start with$
or/
.
- Returns:
Result of the query
- Return type: