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

Any plan to implement JSON-LD Framing? #61

Open
pchampin opened this issue Sep 19, 2023 · 2 comments
Open

Any plan to implement JSON-LD Framing? #61

pchampin opened this issue Sep 19, 2023 · 2 comments

Comments

@pchampin
Copy link
Contributor

(the title says it all...)

@timothee-haudebourg
Copy link
Owner

timothee-haudebourg commented Oct 27, 2023

Not in a near future unfortunately. There is still a lot of progress to make on this library as it is, and framing sounds like a huge task to tackle right now.

Just for information if anyone is interested, I've been working on the linked-data library that provides de/serialization features just like serde but for Linked-Data documents. json-ld already has some support for it so you can do (I'm going by memory, don't take the following code literaly):

#[serde(linked_data::Deserialize, serde::Serialize)]
struct Foo {
  #[ld("http://schema.org/name")]
  name: String
}

let dataset = json_ld.rdf_quads().collect(); // deserialize JSON-LD into RDF
let foo = Foo::deserialize(dataset) // deserialize RDF into `Foo`
let json = serde_json::to_value(&foo) // serialize `Foo` into JSON

In this example I'm using Foo as a frame to organize the RDF dataset extracted from some input JSON-LD, then serialized into JSON (it might just be needing some JSON-LD context). I know it does not replace JSON-LD framing, but it might be useful in the meantime.

@pchampin
Copy link
Contributor Author

pchampin commented Nov 9, 2023

Not in a near future unfortunately. There is still a lot of progress to make on this library as it is, and framing sounds like a huge task to tackle right now.

I totally understand :) I don't have an urgent need for it, but was just curious.

Feel free to close this issue, or leave it open as a long-term feature request. Whatever you find most appropriate.

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

2 participants