Skip to content

fix(rdf): index object values of const, default and enum - #1

Merged
zasherif merged 1 commit into
mainfrom
fix/rdf-json-literals
Nov 7, 2026
Merged

zasherif merged 1 commit into
mainfrom
fix/rdf-json-literals

Conversation

@zasherif

@zasherif zasherif commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

A TD may give const, default or enum an object value, such as {"type": 2}. The SPARQL index read it as JSON-LD, took its "type" key as an RDF type, and failed the whole TD. Such a value is now stored as one JSON literal; strings and numbers are unchanged. A TD that still fails to convert is logged and skipped instead of failing every later sync.

A TD may give const, default or enum an object value, such as
{"type": 2}. The SPARQL index read that object as JSON-LD, took its
"type" key as an RDF type, and failed the whole TD. Such a value is now
stored as one JSON literal. Strings and numbers are unchanged.

A TD that still fails to convert is logged and skipped, instead of
failing every later sync and the server start.

Source: https://www.w3.org/TR/wot-thing-description11/#dataschema
Source: https://www.w3.org/TR/json-ld11/#json-literals

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zasherif <zasherif@users.noreply.github.com>
@zasherif
zasherif merged commit e317700 into main Nov 7, 2026
6 checks passed
@zasherif
zasherif deleted the fix/rdf-json-literals branch November 7, 2026 16:10
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

Successfully merging this pull request may close these issues.

1 participant