[Playlist] xspf over json

Ivo Emanuel Gonçalves justivo at gmail.com
Sat Apr 28 23:16:23 UTC 2007


My apologies.  I was pretty harsh on how I came out regarding JSON,
especially considering my ignorance of the technology.

On 4/28/07, Lucas Gonze <lgonze at panix.com> wrote:
> JSON is fascinating thing, Ivo.  At a literal level it means to
> serialize data structures using Javascript syntax.  It is most commonly
> used by browser apps, which use it because it requires no parsing step
> (unlike XML) and because it can escape both same-domain access
> restrictions and Flash's need for a crossdomain.xml file to allow XML
> loads from third parties.

It sounds fascinating, indeed.  XML has a lot of issues and no one
ever managed to propose anything good enough to replace it.  I'll be
sure to look into JSON and learn more.

> I am for Chris' project.  JSON encodings of XSPF are happening in the
> wild so we should do what we can to make them interoperable.

If there is a demand, yes, I think we should help in making it interoperable.

How're you supposed to spell JSPF, by the way?  Jpiff?

On 4/28/07, Chris Anderson <jchris at mfdz.com> wrote:
> The basic flaw with them is that in trying to make general
> translations from XML to JSON, one loses JSON's principle benefit of
> readability and terseness. By attempting to create JSON that loses no
> information from the XML source, such that one could reverse the
> translation, you end up storing a lot of extra information, and still
> don't get the whole thing perfect. Some problems are the attribute
> order on xml elements, as well as namespacing. Perhaps one can shovel
> those things into Javascript Object Notation, but the result won't be
> pretty.

So, a direct translation won't do, as in the end it just creates more
problems than what it solves.

> Do you think a jspf as a limited subset of xspf has wings, or should I
> shoot for a full implementation?

I suppose JSPF could be created under Xiph's wing, if there's interest
in that regard.  As I understand, JSPF is/will be based on XSPF, so it
becomes limited by what XSPF does, but which isn't little in any way.
If there's an actual need to generate playlists in this JSON format,
then basing JSPF over XSPF is a great idea.

Then again, my ignorance of how JSON works and its uses may lead me to
say crap.  This is very likely the case at hand.

It seems JSPF would be used on this Grab.it project, but I don't
understand exactly what it is.  I requested an invitation to try it,
though.  Is it something like musicbrainz or last.fm?  What purpose
does it exactly serve?  The web site is unfortunately much unclear on
that aspect.



More information about the Playlist mailing list