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

Hi,

I have submitted a pull request to address the issue in the draft:
https://github.com/sysapps/sysapps/pull/36

Kr,
Christophe DUMEZ.
________________________________________
From: Christophe Dumez - SISA [ch.dumez@sisa.samsung.com]
Sent: Friday, February 15, 2013 08:48
To: Jonas Sicking; Marcos Caceres
Cc: public-sysapps@w3.org
Subject: RE: [Alarm API] Object data must be serialisable to JSON

Hi,

Thanks for pointing that out Jonas. It should indeed be "any" instead of "Object".
I'll update the draft accordingly.

Kr,
Christophe DUMEZ.

________________________________________
From: Jonas Sicking [jonas@sicking.cc]
Sent: Friday, February 15, 2013 06:47
To: Marcos Caceres
Cc: public-sysapps@w3.org
Subject: Re: [Alarm API] Object data must be serialisable to JSON

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 06:59:09 UTC