-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The default behavior of calling `to_json` or even `to_s` on unsupported object is problematic in many cases. ``` >> JSON.parse(JSON.dump(Object.new)) => "#<Object:0x00000001034d8420>" ``` In some cases like blind serailization into some kind of store, you may want to assert that `JSON.parse(JSON.dump(obj)) == obj`. The `strict` option is a way to ensure this by rejecting any type that doesn't map cleanly to a JSON native type.
- Loading branch information
Showing
8 changed files
with
1,962 additions
and
2,974 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
Oops, something went wrong.