This is great...nice work.
Also, it's great that you have so many tests. Hopefully at some point
we can centralise everyone's tests and create a 'standard' test-suite
-- and your tests look like a pretty good start.
Regards,
Mark
Wow, that was fast. Nice work, Brad! :)
You're the first implementation up on json-ld.org:
The core algorithm looks really manageable as well, so that's always
nice to see:
http://github.com/bradleypallen/json_ld_processor/blob/master/src/json_ld_processor.py#L129
> Comments, suggestions, brickbats, etc. most welcome. - regards, BPA
Just a few comments:
You may want to change the Python objects that you generate - IRIs don't
need the '<' and '>' characters around them if you normalize them
(expand the CURIEs, that is) for subjects and properties/predicates.
The object literals can be four different types: a plain literal, a
plain literal with a language tag, a typed literal and an IRI. You'll
hit this issue when you try to convert your data to something like
RDF/XML or RDFa. Just a heads-up that your returned object model is
going to have to become a bit more complex.
Here's one way you could do it (librdfa Python example):
http://github.com/msporny/librdfa/blob/master/tests/rdfa2rdfxml.py#L40
-- manu
--
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: Saving Journalism - The PaySwarm Developer API
http://digitalbazaar.com/2010/09/12/payswarm-api/