Commit 8154d24
fix(parse): forward type predicates to inner style (#454)
JSONReadStyle wraps the user-provided style for null/dicttype/unknown_fields config, but
StructUtils dispatches on the wrapping JSONReadStyle. As a result, methods like
dictlike(::CustomJSONStyle, ::Type{A}) defined on a user JSONStyle never fired during
parsing — make() fell through to makestruct instead of makedict.
Forward dictlike, arraylike, and nulllike from JSONReadStyle to its inner st.style so
user-defined dispatches on a custom JSONStyle reach the StructUtils make() router.
Closes #453
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 95024e9 commit 8154d24
2 files changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
230 | 239 | | |
231 | 240 | | |
232 | 241 | | |
| |||
765 | 774 | | |
766 | 775 | | |
767 | 776 | | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
768 | 781 | | |
769 | 782 | | |
770 | 783 | | |
| |||
0 commit comments