You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current built-in template rules for maps and arrays do not work well for a recursive-descent traversal of a JSON-like tree of maps and arrays. The effect of on-no-match="shallow-copy" is to do a deep copy, and the effect of on-no-match="shallow-skip" is to do a deep skip. I therefore propose two new values for on-no-match, provisionally "shallow-copy-all" and "shallow-skip-all".
Yes, please. I've gotten around this restriction by writing, for every shallow-copy mode, explicit template rules for arrays and maps that do such shallow copying. It would be nice to avoid those extra steps.
I've been writing this up and I think I have a clean specification for shallow-copy-all, but I've been having trouble coming up with a spec for shallow-skip-all that does anything remotely useful. It can flatten an array to a sequence of members, but it can't do anything very useful with a map. So I shall leave that one out.
The current built-in template rules for maps and arrays do not work well for a recursive-descent traversal of a JSON-like tree of maps and arrays. The effect of on-no-match="shallow-copy" is to do a deep copy, and the effect of on-no-match="shallow-skip" is to do a deep skip. I therefore propose two new values for on-no-match, provisionally "shallow-copy-all" and "shallow-skip-all".
For more details see my Balisage 2022 paper: https://balisage.net/Proceedings/vol27/html/Kay01/BalisageVol27-Kay01.html
We do in fact have some test cases that use this syntax, see
attr/mode-4001
et seq, but it has never found its way into the spec.The text was updated successfully, but these errors were encountered: