Checking for (JSON) serialisable object

In the Web Alarm spec, there is a method "add()" on an AlarmManager Interface [1] that takes an "optional Object data" :  

  AlarmRequest add(Date date, TimezoneDirective respectTimezone, optional Object data);

The problem is the "data" argument is restricted, in prose, to only allow JSON-serializable objects - leading to a mismatch between the WebIDL and the prose. So, question is, what is the right way to specify that? Is there some WebIDL magic or does it just need to be defined in prose? Like:

1. let result be the result of calling JSON.stringify on the third argument. If there is an error throw…     

Any guidance would be appreciated.  

[1] http://www.w3.org/TR/2013/WD-web-alarms-20130205/#alarmmanager--  
Marcos Caceres
http://datadriven.com.au

Received on Monday, 11 February 2013 22:20:42 UTC