From 75f8cf4b396debf20b6693df31b89a48cf3ea79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Thu, 31 Jan 2019 15:05:46 +1100 Subject: [PATCH] json parse, then convert --- index.html | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 080c7b14..29a673cb 100644 --- a/index.html +++ b/index.html @@ -663,14 +663,31 @@

paymentMethod.data into a string. Rethrow any exceptions. -
  • If required by the specification that defines the - paymentMethod.supportedMethods, - convert - paymentMethod.data to an IDL value of the - type specified there (e.g., a BasicCardRequest - in the case of [[?payment-method-basic-card]]). Rethrow any - exceptions. +
  • If serializedData is not null, and if required + by the specification that defines the + paymentMethod.supportedMethods: +
      +
    1. Let object be the result of + JSON-parsing + serializedData. +
    2. +
    3. +

      + Convert object + to an IDL value of the type specified by the + specification that defines the + paymentMethod.supportedMethods + (e.g., a BasicCardRequest + in the case of [[?payment-method-basic-card]]). + Rethrow any exceptions. +

      +

      + This step assures that any IDL type conversion errors + are caught as early as possible. +

      +
    4. +
  • Add the tuple (paymentMethod.supportedMethods,