5738: Skip alternate handling if already handled by previous step #5971
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
first time through the code trying to fix an issue, so I hope I haven't violated too many architectural rules. :)
We saw this problem when using extensions on datatypes (using data-absent-reason, with code masked and we had an object with both a primitive and an array-property with masked values. We got this output (example from practitioner):
My understanding is that when the object is normally handled, the parser counts alternateNamesSeen, and alternateNames Handled, and when seen > handled, a second pass is done. But instead of only doing un-handled, the second pass will go over all alternates including non-primitive ones where the alternate json.-type need not be an object but could be an array for (any non-primitive property).
Som y idea is to check, and only do the secondary handling if the alternate property in an object does not have a corresponding "real" property.