Skip to content

Commit

Permalink
Use Infra for JSON parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Sep 29, 2017
1 parent 1a8f691 commit 9d5388a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions xhr.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1466,18 +1466,12 @@ or null). Unless stated otherwise it is null.
<p>A <dfn>JSON response</dfn> is the return value of these steps:

<ol>
<li><p>If <a>response</a>'s
<a for=response>body</a> is null, then return null.

<li><p>Let <var>JSON text</var> be the result of running
<a>utf-8 decode</a> on <a>received bytes</a>.
<li><p>If <a>response</a>'s <a for=response>body</a> is null, then return null.

<li><p>Let <var>JSON object</var> be the result of invoking the initial value of the
<code>parse</code> property of the <code>JSON</code> object, with
<var>JSON text</var> as its only argument. If that threw an exception, return null.
[[!ECMASCRIPT]]
<li><p>Let <var>jsonObject</var> be the result of running <a>JSON parse with bytes</a> on
<a>received bytes</a>. If that threw an exception, then return null.

<li><p>Set <a>response object</a> to <var>JSON object</var> and return it.
<li><p>Set <a>response object</a> to <var>jsonObject</var> and return it.
</ol>


Expand Down

0 comments on commit 9d5388a

Please sign in to comment.