Skip to content

Commit

Permalink
json parse, then convert
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Cáceres committed Jan 31, 2019
1 parent fafb88b commit 75f8cf4
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -663,14 +663,31 @@ <h2>
<var>paymentMethod</var>.<a data-lt="PaymentMethodData.data">data</a>
into a string. Rethrow any exceptions.
</li>
<li>If required by the specification that defines the
<var>paymentMethod</var>.<a>supportedMethods</a>,
<a data-lt="converting">convert</a>
<var>paymentMethod</var>.<a>data</a> to an IDL value of the
type specified there (e.g., a <a data-cite=
"payment-method-basic-card#dom-basiccardrequest">BasicCardRequest</a>
in the case of [[?payment-method-basic-card]]). Rethrow any
exceptions.
<li>If <var>serializedData</var> is not null, and if required
by the specification that defines the
<var>paymentMethod</var>.<a>supportedMethods</a>:
<ol>
<li>Let <var>object</var> be the result of
<a data-cite="ECMASCRIPT#sec-json.parse">JSON-parsing</a>
<var>serializedData</var>.
</li>
<li>
<p>
<a data-lt="converting">Convert</a> <var>object</var>
to an IDL value of the type specified by the
specification that defines the
<var>paymentMethod</var>.<a>supportedMethods</a>
(e.g., a <a data-cite=
"payment-method-basic-card#dom-basiccardrequest">BasicCardRequest</a>
in the case of [[?payment-method-basic-card]]).
Rethrow any exceptions.
</p>
<p class="note">
This step assures that any IDL type conversion errors
are caught as early as possible.
</p>
</li>
</ol>
</li>
<li>Add the tuple (<var>paymentMethod</var>.<a data-lt=
"PaymentMethodData.supportedMethods">supportedMethods</a>,
Expand Down

0 comments on commit 75f8cf4

Please sign in to comment.