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

Support for adding Collections to Things #1648

Open
travis opened this issue Jun 23, 2022 · 1 comment
Open

Support for adding Collections to Things #1648

travis opened this issue Jun 23, 2022 · 1 comment
Labels
enhancement New feature request

Comments

@travis
Copy link
Contributor

travis commented Jun 23, 2022

Search terms you've used

Collection, Container, Seq

Feature suggestion

I'd like a set of functions (eg, addListToThing and removeListFromThing) that let me add collections to Things. The @rdfdev/collections library has a good set of functions for doing this with the lower level RDF abstractions, but it doesn't play especially nicely with the solid-client Resource and Thing abstractions

Use Cases

I'd like to be able to convert a JavaScript object to a pure-RDF format rather than serializing to JSON and storing as a string. The JSON for note bodies in Mysilio Garden is becoming prohibitively large and we'd like to be able to take advantage of the PATCH support built in to Solid servers to optimize this.

@travis
Copy link
Contributor Author

travis commented Jun 28, 2022

I worked up a version of this that uses rdf:List (as describe in https://ontola.io/blog/ordered-data-in-rdf/) here:

https://github.com/mysilio-co/garden-kit/blob/rdf-note-serialization/src/collections.ts

You can see how we use this with our own "element [de]serializers" here:

https://github.com/mysilio-co/garden-kit/blob/rdf-note-serialization/test/note.test.ts

Would y'all be interested in me porting this code over to this repository? Any thoughts on the API? I'm not convinced it's the right general purpose solution so would love any thoughts.

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

No branches or pull requests

1 participant