[Bug 20415] Add a serializer to MIDIPort

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20415

--- Comment #3 from Chris Wilson <cwilso@gmail.com> ---
(In reply to comment #2)
> (In reply to comment #1)
> > Can you describe exactly what feature you're trying to get from this (i.e.
> > user scenario)?
> 
> See "9.2 Enumerating Inputs and Outputs" example:
> https://dvcs.w3.org/hg/audio/raw-file/tip/midi/specification.
> html#enumerating-inputs-and-outputs
> 
> That's pretty common... with toJSON, it becomes something like:
> 
> function showPorts( midiAccess ) {
>   function show(port, i){
>      console.log("Input port #" + i + " " + port.toJSON());
>   }
>   midiAccess.enumerateInputs().forEach(show);
>   midiAccess.enumerateOutputs().forEach(show);
> }

That sample was just enumerating the parameters for debugging purposes, though
- serialization implies deserialization.  I don't think the "serialize
everything in the input/output object" is a particularly interesting scenario,
unless you're trying to imply that fromJSON() could re-create the port - and
this is a "magic host object".  :)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 17 December 2012 21:01:27 UTC