Skip to content

Validate a json-ld file against the context #24

Answered by marcelotto
carlotm asked this question in Q&A
Discussion options

You must be logged in to vote

For validating the allowed keys ("valid keys"), you'll need to do this at the JSON level before the JSON-LD processing, since JSON-LD will create new IRIs for any properties it encounters. Libraries like ex_json_schema can help you with this.

Type validation can be done at the RDF level using SHACL or ShEx. However, there's currently no maintained SHACL implementation in Elixir, and you'd need to use external tools like Apache Jena or TopBraid. While there was a ShEx implementation for Elixir, it's no longer maintained and isn't compatible with current RDF.ex versions.

If you plan to work with the data in Elixir anyway, you might want to look into Grax: https://rdf-elixir.dev/grax/, which…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by carlotm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants