-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add convenience function json2:obj_fetch/3
The json2:obj_fetch/2 either returns an object member's value or exits with a struct_no_key error if the object member is not found. Add json2:obj_fetch/3 that returns either the object member's value or a default value if the object member is not found. Add a new unit test for json2:obj_fetch/2,3 to the json2_SUITE. Also in json2_SUITE, fix the test source directories for the json2_decode_valid and json2_decode_invalid tests. Add asserts to verify that one or more test files are processed by those tests.
- Loading branch information
Showing
2 changed files
with
37 additions
and
5 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