Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow Entity to be deserialized with serde_json (#3873)
# Objective - `serde_json` assumes that numbers being deserialized are either u64 or i64. - `Entity` serializes and deserializes as a u32. - Deserializing an `Entity` with `serde_json` fails with: `Error("invalid type: integer 10947, expected expected Entity"` ## Solution - Implemented a visitor for u64 that allows an `Entity` to be deserialized in this case. - While I was here, also fixed the redundant "expected expected Entity" in the error message - Tested the change in a local project which now correctly deserializes `Entity` structs with `serde_json` when it couldn't before
- Loading branch information