Title: Enhancement: Use rdflib's JSON-LD parser for full context expansion · Issue #2 · JavaScriptSolidServer/solid-shim · GitHub
Open Graph Title: Enhancement: Use rdflib's JSON-LD parser for full context expansion · Issue #2 · JavaScriptSolidServer/solid-shim
X Title: Enhancement: Use rdflib's JSON-LD parser for full context expansion · Issue #2 · JavaScriptSolidServer/solid-shim
Description: Current Behavior The parseJsonLdToStore() function uses a simple manual parser that only expands the schema: prefix: const typeUri = node['@type'].replace('schema:', 'http://schema.org/') This means JSON-LD using other vocabularies (like...
Open Graph Description: Current Behavior The parseJsonLdToStore() function uses a simple manual parser that only expands the schema: prefix: const typeUri = node['@type'].replace('schema:', 'http://schema.org/') This mean...
X Description: Current Behavior The parseJsonLdToStore() function uses a simple manual parser that only expands the schema: prefix: const typeUri = node['@type'].replace('schema:', 'http://sch...
Opengraph URL: https://github.com/JavaScriptSolidServer/solid-shim/issues/2
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Enhancement: Use rdflib's JSON-LD parser for full context expansion","articleBody":"## Current Behavior\n\nThe `parseJsonLdToStore()` function uses a simple manual parser that only expands the `schema:` prefix:\n\n```typescript\nconst typeUri = node['@type'].replace('schema:', 'http://schema.org/')\n```\n\nThis means JSON-LD using other vocabularies (like W3C Verifiable Credentials) must use full URIs instead of relying on `@context` expansion.\n\n## Proposed Enhancement\n\nUse rdflib's built-in JSON-LD parser which handles full context expansion:\n\n```typescript\n$rdf.parse(jsonLdString, store, baseUri, 'application/ld+json')\n```\n\n## Benefits\n\n- Full JSON-LD context expansion\n- Support for any vocabulary without code changes\n- Proper handling of `@type` arrays\n- Standards-compliant parsing\n\n## Considerations\n\n- **Network latency**: Context URLs need to be fetched (could cache common ones)\n- **Offline support**: Would need bundled/cached contexts\n- **Async**: `$rdf.parse()` with remote contexts is async\n\n## Possible Approach\n\n1. Use `$rdf.parse()` for full JSON-LD support\n2. Bundle common contexts (schema.org, credentials/v1, etc.)\n3. Fall back to simple parser if context fetch fails\n\n## Related\n\n- Issue #1: @type array handling (subset of this problem)\n- W3C Verifiable Credentials demo requires full URIs as workaround","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-01-06T21:37:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/solid-shim/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:12807d1d-d185-65f9-b434-f43b4c8b309e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 840E:2E9694:23C10B8:31A51B5:69779EC0 |
| html-safe-nonce | b4ef37d0b3e31dd98ffb12c8ca718bf37580828fd5fe51cafc2fa79d20367ff2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDBFOjJFOTY5NDoyM0MxMEI4OjMxQTUxQjU6Njk3NzlFQzAiLCJ2aXNpdG9yX2lkIjoiNzgwNDc1OTA3MjQ5MzI0ODE5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 89db44630ffaa946c315f7deeaa6d9a49efe116129e139b9c1043333e7a0c37f |
| hovercard-subject-tag | issue:3786621406 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/solid-shim/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1ecc846dd2e590e0d46e9eecb434378e0551841c7c38f2158e4f0cdd63012563/JavaScriptSolidServer/solid-shim/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1ecc846dd2e590e0d46e9eecb434378e0551841c7c38f2158e4f0cdd63012563/JavaScriptSolidServer/solid-shim/issues/2 |
| og:image:alt | Current Behavior The parseJsonLdToStore() function uses a simple manual parser that only expands the schema: prefix: const typeUri = node['@type'].replace('schema:', 'http://schema.org/') This mean... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | e10aafdf5297192c9b24eb4c1705326a9448d90025c2907ca863f7e62d40627d |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/solid-shim git https://github.com/JavaScriptSolidServer/solid-shim.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 1125206031 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/solid-shim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1125206031 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/solid-shim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6ba450e9e3f0dbffd9b797b93684cf55e32593e3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width