Commit d48a9a7
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.1 parent 16b8864 commit d48a9a7
2 files changed
+22
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
| 255 | + | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| |||
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
| 303 | + | |
| 304 | + | |
299 | 305 | | |
300 | 306 | | |
301 | 307 | | |
302 | 308 | | |
303 | 309 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | 310 | | |
308 | 311 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
244 | 257 | | |
245 | 258 | | |
246 | 259 | | |
| |||
0 commit comments