Storing user preferences in a POD

I am writing a trading application and am looking at having it work for solid users. I am wondering what the best approach would be for storing a user’s preferences in their Solid POD. So say all preferences fall into one of two categories - Market and Trading. And then within these categories we can have specific preferences or further sub-categories and so on. So the preferences could be outlined in a tree something like the following:

Could someone recommend me the best way to save/restore such a tree in a user’s solid POD?

Thanks
Des

1 Like

maybe you should upload a pic of your algorythm

Why did you ask me to do that if you weren’t going to help me with it?

Hi Des,

It may not be necessary to reflect the tree structure itself inside the stored preferences. Since you’re in control of the code for the app you’re making, you could just store the preferences as a series of key/value pairs in a JSON or XML file on the POD, and then reconstruct the tree from that data as part of the initialization process when your app loads and reads the preferences file.

If you want to store the preferences in a Solid pod using linked data, you will need an ontology to capture the relationships you have drawn out. You can look at https://lov.linkeddata.es/dataset/lov or https://lod-cloud.net/ to see if there are already ontologies related to trading, If not you could either create one or use a generic tree-structure ontology such as SKOS - Simple Knowledge Organization Schema - see https://www.w3.org/TR/skos-reference/.

Hi, I have a question.

Is there any format available to store VC (verifiable credential) in the solid pod?

Hi @wahed ,

I recommend you look into the W3C VC Data Model here: Verifiable Credentials Data Model v1.1

Cheers,
Nick.-

1 Like

Hi @nicolasmondada,

I looked into the W3C Data model. Verifiable Credential is like a json object right?. Is it ok to store VC as JSON or JSON-LD format?

And is it the actual way to store VC as JSON into solid pod?

You can just save json/json-ld in your pod, though the File APIs@inrupt/solid-client will only parse text/turtle out of the box.

2 Likes