resolve

fun EvaluationScope.resolve(dataModel: JsonElement, pointer: JsonPointer): JsonElement?

The value pointer addresses in dataModel once rebased on this scope, or null when absent.


fun JsonElement.resolve(pointer: JsonPointer): JsonElement?

The value pointer addresses, or null when nothing is there.

Missing is not an error: the specification requires renderers to tolerate a binding whose updateDataModel has not arrived yet ("data paths may resolve to undefined during the initial streaming phase") and to render a placeholder instead. A caller that needs to tell "absent" from "present and JSON null" can compare the result against JsonNull.

A relative pointer is resolved as if from this element, so callers holding an EvaluationScope should rebase it first — see EvaluationScope.resolve.