Re: [whatwg/fetch] Add `Response.json` static method (PR #1392)

@yutakahirano commented on this pull request.



> @@ -7520,6 +7542,25 @@ are:
  <li><p>Return <var>responseObject</var>.
 </ol>
 
+
+<p>The static
+<dfn method for=Response><code>json(<var>data</var>, <var>init</var>)</code></dfn> method steps
+are:
+
+<ol>
+ <li><p>Let <var>bytes</var> the result of running <a>serialize a JavaScript value to JSON bytes</a>

This can fail (e.g., when a getter throws an exception), what do we want to do in that case? Do we want to throw an exception?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1392#pullrequestreview-903873444
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1392/review/903873444@github.com>

Received on Wednesday, 9 March 2022 05:18:34 UTC