Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes behavior of toJSON to work as expected with JSON.stringify #1312

Merged
merged 2 commits into from
Aug 14, 2015

Conversation

braydonf
Copy link
Contributor

@pnagurny
Copy link
Contributor

ACK

- see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior
- Updates CONTRIBUTING with changes to Stardard Methods
- Aliases toJSON for toObject
- Removes all `fromJSON` methods, and many cases replaces with `fromObject`
- Constructors expect an object parsed via `JSON.parse` for JSON input
@braydonf
Copy link
Contributor Author

Rebased on master

pnagurny added a commit that referenced this pull request Aug 14, 2015
Changes behavior of `toJSON` to work as expected with `JSON.stringify`
@pnagurny pnagurny merged commit 9960c3b into bitpay:master Aug 14, 2015
@dskloet
Copy link
Contributor

dskloet commented Sep 27, 2015

What's the reason for removing fromJSON as well? The Mozilla page doesn't mention it so I see no reason not to leave it for convenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants