Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON-LD Support #17

Open
JordanShurmer opened this issue Dec 3, 2019 · 9 comments
Open

Add JSON-LD Support #17

JordanShurmer opened this issue Dec 3, 2019 · 9 comments

Comments

@JordanShurmer
Copy link

Another common RDF format is json-ld. In fact, this is a required format for ldp servers. I'll gladly contribute to this when I get the time, but I figured I should go ahead and open this issue.

I assume this would involve adding a new crate rio_jsonld, following the paradigm already established for the other parsers.

@Tpt
Copy link
Collaborator

Tpt commented Dec 3, 2019

Hi @JordanShurmer! It would be amazing to have JsonLD support in Rio.

The official JSON-LD RDF (de)serialization algorithm depends on other algorithms that seems out of scope of Rio. It might be nice to have a separate library implementing and exposing JSON-LD algorithms and then provide a wrapper for it in Rio allowing to do (de)serialization using the same interface as for the other formats supported by Rio.

PS: I have just seen that you started a Solid server project in Rust. I would be pleased to help and you could find useful my Oxigraph project.

@JordanShurmer
Copy link
Author

Yeah, that makes sense having the algorithm as a crate which a rio crate depends on.

Yeah, I was looking at that project earlier today :) Definitely similarities, and I welcome any contributions to the solid-rust project. It's just me so far, so there's not any legit project plan or timeline or whatever, but feel free to contribute however you want. This is my first real rust project, so I'm sure there's overall improvements/architectural changes that could be made too.

@joepio
Copy link

joepio commented May 13, 2020

Perhaps the sophia_jsonld crate could be useful: https://github.com/pchampin/sophia_rs

Only supports expanded syntax at this time.

@damooo
Copy link

damooo commented Feb 1, 2022

The official JSON-LD RDF (de)serialization algorithm depends on other algorithms that seems out of scope of Rio.

@Tpt ,
Official de-serialization algos seem to assume loading entire json as object, and derive semantic statements by manipulating/analyzing those json structures. This definitely is out of scope for rio.

And there is popular jsonld-streaming-parser.js lib, that do parse json-ld docs in streaming way, much like parsers for other syntaxes. This is one of standard lib in rdfjs ecosystem. This model can fit in scope of rio, i hope. There is also corresponding streaming serialization library too.

@damooo
Copy link

damooo commented Feb 1, 2022

here is a high level overview of approach taken by above lib :
https://www.rubensworks.net/blog/2019/03/13/streaming-rdf-parsers/

@almereyda
Copy link

There is also the json_ld crate (src) which comes with support for expansion, compaction and flattening.

@ccamel
Copy link

ccamel commented Nov 14, 2023

Any progress on this? Having json-ld supported would be sooo great!

@Tpt
Copy link
Collaborator

Tpt commented Nov 14, 2023

@ccamel Sadly not in Rio. But the great news is that the json_ld crate new supports emitting quads. So, there is a Rust solution.

@ccamel
Copy link

ccamel commented Jan 11, 2024

@amimart fyi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants