Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't ignore additional entries in
UntypedReflectDeserializerVisitor
(
#7112) # Objective Currently when `UntypedReflectDeserializerVisitor` deserializes a `Box<dyn Reflect>` it only considers the first entry of the map, silently ignoring any additional entries. For example the following RON data: ```json { "f32": 1.23, "u32": 1, } ``` is successfully deserialized as a `f32`, completly ignoring the `"u32": 1` part. ## Solution `UntypedReflectDeserializerVisitor` was changed to check if any other key could be deserialized, and in that case returns an error. --- ## Changelog `UntypedReflectDeserializer` now errors on malformed inputs instead of silently disgarding additional data. ## Migration Guide If you were deserializing `Box<dyn Reflect>` values with multiple entries (i.e. entries other than `"type": { /* fields */ }`) you should remove them or deserialization will fail.
- Loading branch information