Re: [whatwg/url] URL.toJSON() returns a string, not an object — misleading name, consider toJSONObject (Issue #888)

jasnell left a comment (whatwg/url#888)

Expecting toJSON to always return an object would just be a misunderstanding of what the toJSON method is for. It returns a representation of the object suitable for JSON serialization. That can be any JSON-supported value type. I think the spec here is clear enough on this point. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/888#issuecomment-3422031129
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/888/3422031129@github.com>

Received on Monday, 20 October 2025 13:18:17 UTC