Implement IgnoreExtraFieldsFromTextual#303
Merged
rockwotj merged 4 commits intolinkedin:masterfrom Jan 14, 2026
Merged
Conversation
Contributor
Author
|
@rockwotj Re-implemented the solution. Please review |
Contributor
Author
|
@rockwotj @mihaitodor any chance you could look at this PR shortly? |
rockwotj
approved these changes
Jan 14, 2026
Collaborator
rockwotj
left a comment
There was a problem hiding this comment.
Generally LGTM, some nitpicks during review
| t.Fatalf("expected empty remaining buffer, got: %v", remaining) | ||
| } | ||
|
|
||
| m, ok := native.(map[string]interface{}) |
Contributor
Author
There was a problem hiding this comment.
Because of the support for GO 1.12, we still need to keep interface{}. Or am I missing something?
Collaborator
There was a problem hiding this comment.
should probably bump that, it's EOL
json_utils.go
Outdated
Comment on lines
166
to
168
| if i >= len(buf) { | ||
| return nil, io.ErrShortBuffer | ||
| } |
Collaborator
There was a problem hiding this comment.
this check isn't required right? the loop conditional should catch it?
| } | ||
|
|
||
| // skipJSONString skips a JSON string starting with '"' and returns the buffer after the closing '"'. | ||
| func skipJSONString(buf []byte) ([]byte, error) { |
Collaborator
There was a problem hiding this comment.
Maybe it's OK, but this doesn't validate the string
Collaborator
|
Merge conflicts @passuied |
Contributor
Author
|
Addressed your feedback @rockwotj please re-review |
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.
Description
Add ability to ignore extra fields from textual representation
Approach:
Usage example:
Issue Reference
#294