-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JsonObject member sanity checking
Verify when we destroy a JsonObject that we actually visited all the fields of that object. If we didn't, this suggests an error of some kind in the input data. Default is to report an error to the debug log, which users won't notice, but will cause a test failure in CI. This means we need to nearly always pass JsonObjects by non-const reference, so that all the member visitations get registered in a single place. One can opt out of this check by calling allow_omitted_members on the JsonObject. We need to add such calls in a bunch of places that don't visit all the members for one reason or another. Also added various other tweaks and workarounds to prevent false error report. The checking has to not be turned on when building the json tooling executables, because it leads to linking errors (the debug log doesn't exist for them).
- Loading branch information
Showing
27 changed files
with
240 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.