the proposal to use a parse method allows to change current code from:

```
        ReaderRIOT reader = RDFDataMgr.createReader(Lang.JSONLD);
        try (InputStream in = new 
ByteArrayInputStream(jsonld.getBytes(StandardCharsets.UTF_8))) {
            reader.read(in, null, null, 
StreamRDFLib.dataset(ds.asDatasetGraph()), jenaCtx);
        }
```

to:

```
        try (InputStream in = new 
ByteArrayInputStream(jsonld.getBytes(StandardCharsets.UTF_8))) {
            RDFDataMgr.parse(StreamRDFLib.dataset(ds.asDatasetGraph()), in, 
null, Lang.JSONLD, jenaCtx);
        }
```

That’s indeed one line instead of 2, and one param less in the method used 
(ContentType, here set to null).
Simpler indeed. 
(Not that simple to use the context mechanism in read and write, but OK! ;-))
I do the change

> Le 9 janv. 2017 à 16:54, ajs6f <g...@git.apache.org> a écrit :
> 
> Github user ajs6f commented on the issue:
> 
>    https://github.com/apache/jena/pull/203
> 
>    You're saying use `org.apache.jena.riot.RDFDataMgr.parse(StreamRDF, 
> InputStream, String, Lang, Context)`? That does make sense. I guess I was 
> thinking of the general need to customize parsing behavior, but as long as 
> there is a reasonably concise form, that's all I care about. @fpservant does 
> that work for you?
> 
> 
> ---
> 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 infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---

Reply via email to