Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better JSON type mismatch errors (#1147)
This changes the JSON parsing to use a std::variant so there just a single OnValue handler vs OnString/OnNumber/OnBool/OnNull. Previously a mismatched type would say `JSON Error: Unknown value: name at line 3 index 19` or it would say `JSON Error: Unknown value: name` if the name was known but the type of its value was wrong (example: #1146). Now it'll give a much better error message, showing first the full path of the field being parsed, and then saying exactly how the types mismatch: `JSON Error: model:type - Expected a number but saw a string at line 3 index 19`
- Loading branch information