W3C home > Mailing lists > Public > public-sysapps@w3.org > February 2013

Re: [Alarm API] Object data must be serialisable to JSON

From: Jonas Sicking <jonas@sicking.cc>
Date: Thu, 14 Feb 2013 20:47:14 -0800
Message-ID: <CA+c2ei8K+BRHn5RmQ41-RxmzEBz098GXo_PHpzV2f1z028w=8Q@mail.gmail.com>
To: Marcos Caceres <marcosscaceres@gmail.com>
Cc: public-sysapps@w3.org
Using Object here is not correct since we want to allow passing
strings, numbers and booleans too. I.e. we want to support passing
anything which can be serialized as JSON.

So instead the third argument should be "optional any data".

/ Jonas

On Mon, Feb 11, 2013 at 2:22 PM, Marcos Caceres
<marcosscaceres@gmail.com> wrote:
> The spec says:
>> > AlarmRequest add(Date date, TimezoneDirective respectTimezone, optional Object data);
> This has been raised before, but the definition of "data" is not quite right. It's not so much that data is a [Web IDL] Object (that would be all objects that inherit from Object, including Window I guess), but that data needs to be serialisable to a JSON string. I don't know what the right WebIDL is for specifying that (if it's even possible, but I've asked on public-script-coord@w3.org [1]). It might just have to be defined in prose a bit better.
> [1] http://lists.w3.org/Archives/Public/public-script-coord/2013JanMar/0130.html--
> Marcos Caceres
> http://datadriven.com.au
Received on Friday, 15 February 2013 04:48:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:36:11 UTC