-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/jsonutil: Skip unexported fields.
This change makes jsonutil.UnmarshalGraphQL not consider unexported fields when looking for a matching field. This is done because such fields cannot be unmarshaled into, and it's more consistent with behavior of package encoding/json. Document unmarshalValue precondition that v must be addressing and not obtained by the use of unexported fields. That would make it settable, which is a requirement for the needs of unmarshalValue. We arrange the internal jsonutil code so that unmarshalValue is never called on an unsettable reflect.Value. Fixes #36.
- Loading branch information
1 parent
16b8864
commit d48a9a7
Showing
2 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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