Github user fpservant commented on the issue:
https://github.com/apache/jena/pull/139
I updated this with some sample code, and it seems to me that this is as
good as *I* can. The sample code is the best place to learn how it works and
what it does.
Andy, answering your remarks (Jul 10):
> Examples can go in jena-arq/src-examples/arq/examples/riot/.
done
> A new section about JSON-LD output for
https://jena.apache.org/documentation/io/rdf-output.html
this still has to be done, but if I understand correctly, this is the
documentation about the release, isn't it? (so should be updated later)
> Symbols are fine but URI's please!
done
> RDFDataMgr The way to set things specially for a writing is to do:...
ok. No new "write" methods with a Context argument (as there were in my
frist attempt)
> If you want, add a new API class specific to JSON output ``JsonLdMgr ``
I created only a JSONLDWriteContext class (extending Context), with setters
for the relevant Symbols
> Constants This could be tidied out with a subclass of ``RDFFormatVariant``
see ``public static class JSONLDVariant extends RDFFormatVariant`` inside
RDFFormat.java, with methods such as ``isCompact()``, `isFratten()``etc.
> We need to be able to run the tests without assuing that external network
resources
done
> Code organisation. If you feel there classes, fell free to create a
package org.apache.jena.riot.out.jsonld
very few classes, actually.
I moved ``jena/riot/out/JsonLDWriter.java`` (and ``JenaRDF2JSONLD``) to
``jena/riot/writer`` to have it with other writers. Only one new
file``jena/riot/JsonLDWriteContext``
> Indentation: spaces, not tabs please.
done
Tell me if you want me to change things
Best
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---