This feature request is to optionally allow mpath.resolve to return MPath Pointers that do not point to existing entries (i.e., the paths do not exist).
The proposed solution is to replace the named argument AllowEmptyFields with a new one NullField which dictates behavior when a null field is encountered. When a field that does not exist is encountered, the behavior will be dictated by the value of Nullfield:
omit -- Ignores the invalid/null path and excludes it from the result
missing -- Replaces the invalid/null path with a missing Pointer
retain -- Keeps the invalid/null path
error -- Gives an error
There is some overlap in functionality between this proposal and FillGaps with some nuanced differences when working with heterogeneous data structures. These details may not matter to the end user, so merging FillGaps with NullField should be considered.
This feature request is to optionally allow `mpath.resolve` to return MPath Pointers that do not point to existing entries (i.e., the paths do not exist).
The proposed solution is to replace the named argument `AllowEmptyFields` with a new one `NullField` which dictates behavior when a null field is encountered. When a field that does not exist is encountered, the behavior will be dictated by the value of `Nullfield`:
- `omit` -- Ignores the invalid/null path and excludes it from the result
- `missing` -- Replaces the invalid/null path with a missing Pointer
- `retain` -- Keeps the invalid/null path
- `error` -- Gives an error
There is some overlap in functionality between this proposal and `FillGaps` with some nuanced differences when working with heterogeneous data structures. These details may not matter to the end user, so merging `FillGaps` with `NullField` should be considered.