json.Parser
should throw an error when useMapping = false
and key "default" is encountered
#561
Labels
json.Parser
should throw an error when useMapping = false
and key "default" is encountered
#561
The behavior as-is is very surprising! Check this out:
Result:
I think throwing an error (or at least some kind of warning) here instead of returning unexpected results is desirable. Something like "encountered object key
default
when parsing JSON, resultingDynamic
will be incomplete or invalid" might make sense.N.B.: Attempting to access the default yields further surprises:
asDynamicDefault = asDynamic.default
Result:
The text was updated successfully, but these errors were encountered: