[Playlist] xspf/json
Chris Anderson
jchris at mfdz.com
Sun Feb 18 05:24:35 UTC 2007
Is there any document summarizing use cases for meta and link, as well
as extensions? I think I'd be inclined to add any application specific
data on the extension island. Meta and link are still mysterious to
me. Maybe there's a good reference feed that makes heavy use of all
the fields?
Thanks,
C
On 2/17/07, Lucas Gonze <lgonze at panix.com> wrote:
> Really excellent to see this, Chris. I can think of many usecases.
>
> Fabricio was working on a JSON version of XSPF a little ways back,
> though I don't know how far he got. I think that he felt XSPF is overly
> verbose in JSON and there needed to be an adjusted syntax; it couldn't
> just be a direct translation. For myself I think that it's probably
> less trouble to allow the verbosity than to explain to every developer
> who comes along why the JSON doesn't quite line up.
>
> About fitting the extension, meta and link elements into JSON, I would
> have to start by writing the XML parser and looking at how the data
> structure looked. My impression is that parser developers have usually
> left the extension element up to the mercy of the underlying XML
> library, and done direct support only for the meta and link elements.
>
> -Lucas
>
> Chris Anderson wrote:
> > I'm working on a javascript xspf parser (turns out to be very simple)
> > and now I'm interested in doing some ajax stuff with a json transport.
> > My goal is to build a json string which evaluates to the same data
> > structure my parser has been producing (so far I've only worked on the
> > track element). My first attempt looks like this:
> >
> > {"tracks":[{"location":"http://example.com/song.mp3","annotation":null,"identifier":"http://music.co/tracks/11","title":"Track
> >
> > Title","album":"Album Title","creator":"Artist
> > Name","trackNum":3,"duration":51200,"info":"http://music.co/tracks/11"},{"location":"http://example.com/more.mp3","annotation":"Track
> >
> > by Artist","identifier":"http://music.co/tracks/3","creator":"Unknown
> > Artist","image":"http://example.com/more.jpg"}]}
> >
> > The parser code is at http://pastie.caboo.se/41127
> >
> > If anyone can give me tips about how to fit the extension, meta and
> > link elements into json I'd be much obliged. I'll probably be
> > extending the json myself, and I'd like to do so in a way that
> > maintains its equivalence with the xspf format.
> >
> > --
> > Chris Anderson
> > http://jchris.mfdz.com
> >
> > _______________________________________________
> > Playlist mailing list
> > Playlist at lists.musicbrainz.org
> > http://lists.musicbrainz.org/mailman/listinfo/playlist
> >
> >
>
>
> _______________________________________________
> Playlist mailing list
> Playlist at lists.musicbrainz.org
> http://lists.musicbrainz.org/mailman/listinfo/playlist
>
--
Chris Anderson
http://jchris.mfdz.com
More information about the Playlist
mailing list