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

toJSON() serialization #56

Closed
stevenvachon opened this issue Aug 8, 2016 · 7 comments
Closed

toJSON() serialization #56

stevenvachon opened this issue Aug 8, 2016 · 7 comments

Comments

@stevenvachon
Copy link
Contributor

console.log( JSON.stringify( new (require("whatwg-url").URL)("http://domain/") ) )

produces:

{}
@Sebmaster
Copy link
Member

What's the issue?

@stevenvachon
Copy link
Contributor Author

whatwg/url#137

@domenic
Copy link
Member

domenic commented Aug 8, 2016

Please stop opening spec bugs here... The spec has no toJSON, so do we.

@domenic domenic closed this as completed Aug 8, 2016
@stevenvachon
Copy link
Contributor Author

stevenvachon commented Aug 8, 2016

It's been said that it should serialize to components... in my above example, this implementation does not.

@domenic
Copy link
Member

domenic commented Aug 8, 2016

That's a matter of how your browser prints things. It doesn't affect implementation of the library.

@stevenvachon
Copy link
Contributor Author

Prints things? It's a string.

@domenic
Copy link
Member

domenic commented Aug 8, 2016

Sorry, I was confused about console.log vs. JSON.stringify. But regardless, we are following the spec here.

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

No branches or pull requests

3 participants