This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Since IDL also helps (and I realize that it does not do this for everyone and that can improve upon it) with making object behavior more clear, it would be nice if there was a way to identify JSON other than using object or any. Both XMLHttpRequest and fetch() will be able to return JSON objects. XMLHttpRequest uses any for response. fetch() will have to do the same for its Promise<> returned from bodyAs().
Will there be processing model differences of some sort from "object"? If so, what will they be?
I don't think so. I thought it would be nice to indicate that something returns either JSON, a Blob, or a string. `(Blob or JSON or DOMString)` seems more clear than `any`.
Agreed - having a typedef for "JSON" seems like it would make the signatures much easier to understand.
If there's no particular processing model difference, why not just do "typedef object JSON"?
Fair.
(In reply to Tab Atkins Jr. from comment #3) > Agreed - having a typedef for "JSON" seems like it would make the signatures > much easier to understand. It wouldn't hurt if specs that manipulate JSON in memory (i.e. not as serialised JSON) had some common terminology in order to do so. Right now it's a bit all over the place.