fix(json): improve handling of omitempty with embedded pointers#89
Open
dominicbarnes wants to merge 4 commits intomasterfrom
Open
fix(json): improve handling of omitempty with embedded pointers#89dominicbarnes wants to merge 4 commits intomasterfrom
dominicbarnes wants to merge 4 commits intomasterfrom
Conversation
brib2616
approved these changes
Jun 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes #63 by improving the handling of embedded pointers. Not surprisingly, these are a tricky bunch to contend with, so I've included a few test cases to demonstrate the efficacy of this change, but would appreciate some feedback on additional test cases to include.
In short, when passing a value to the "is empty" func, previously we weren't following pointers properly when they were embedded since we failed to track the pointer addresses own offset. This fix still feels kinda janky to me, especially to someone not especially comfortable with dealing with pointers like this, but it seems to get the job done.