rvesse commented on issue #3698: URL: https://github.com/apache/jena/issues/3698#issuecomment-3749753717
This feels like an [XY problem](https://en.wikipedia.org/wiki/XY_problem), though that may just be that the way you've phrased your question isn't sufficiently detailed/clear enough for me to understand what you are trying to achieve > My problem is that those conversions are now contained in classes also responsible for reading and writing files when I would like to be able do those transformations in-memory Are you asking whether you can take a Jena `Graph`/`DatasetGraph` and obtain the JSON-LD as an in-memory string? And vice-versa? If yes, then yes you can. For the write path just pass in a `ByteArrayOutputStream` as the `OutputStream` to the writer APIs and then convert the `byte[]` back to a UTF-8 string i.e. `new String(output.toByteArray())` as needed. Similarly for the read-path Jena allows for providing input data as a string, or arbitrary `InputStream` implementation e.g. `ByteArrayInputStream`, as needed. --- If you are trying to do something else then you need to explain this more clearly, preferably with an example of what you did on previous Jena versions that you want to achieve with the current version -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
