Title: Translate non-JSON-LD RDF formats to JSON-LD for HTML data island embedding · Issue #344 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Translate non-JSON-LD RDF formats to JSON-LD for HTML data island embedding · Issue #344 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Translate non-JSON-LD RDF formats to JSON-LD for HTML data island embedding · Issue #344 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary When serving the HTML view of a stored resource, JSS embeds a JSON-LD data island in the response. This works for resources stored as JSON-LD. For resources stored in Turtle or N3, the data island is currently empty. This issue t...
Open Graph Description: Summary When serving the HTML view of a stored resource, JSS embeds a JSON-LD data island in the response. This works for resources stored as JSON-LD. For resources stored in Turtle or N3, the data...
X Description: Summary When serving the HTML view of a stored resource, JSS embeds a JSON-LD data island in the response. This works for resources stored as JSON-LD. For resources stored in Turtle or N3, the data...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/344
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Translate non-JSON-LD RDF formats to JSON-LD for HTML data island embedding","articleBody":"## Summary\n\nWhen serving the HTML view of a stored resource, JSS embeds a JSON-LD data island\nin the response. This works for resources stored as JSON-LD. For resources stored\nin Turtle or N3, the data island is currently empty.\n\nThis issue tracks adding server-side format translation so all stored RDF formats\npopulate the data island uniformly.\n\n## Current Behavior\n\n| Stored content type | Data island populated? |\n|-----------------------|------------------------|\n| `application/ld+json` | yes |\n| `text/turtle` | no |\n| `text/n3` | no |\n\n## Proposed Behavior\n\nIn the HTML path of `src/handlers/resource.js`:\n\n1. If stored content is JSON-LD → embed as-is (current behavior).\n2. If stored content is Turtle / N3 → parse (n3.js) and serialize to JSON-LD,\n then embed.\n3. If parse/serialize fails → omit the data island; existing fetch-based render\n continues to work.\n\n## Scope\n\n- `src/handlers/resource.js`: select translation path by content type.\n- Small helper, e.g. `src/rdf/toJsonLd.js`.\n- Tests:\n - JSON-LD passthrough unchanged\n - Turtle → JSON-LD embedded correctly\n - N3 → JSON-LD embedded correctly\n - Parse-failure falls back cleanly (no broken HTML)\n\n## Out of Scope\n\n- Client-side consumption of the data island.\n- `application/rdf+xml` (rare; fall back to network fetch).\n- Streaming for very large resources (already capped at 256 KB).\n\n## Acceptance\n\n- HTML view of a Turtle-stored resource emits a non-empty\n `\u003cscript type=\"application/ld+json\" id=\"dataisland\">`.\n- Same for N3.\n- JSON-LD passthrough behavior unchanged.\n- Existing tests remain green; new tests cover the three cases above.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-02T00:38:13Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/344"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:9ae828ab-6084-0493-b180-4fde17e9dde1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D78A:14F885:FBBDC9:141686E:6B0398D9 |
| html-safe-nonce | e3ff7f0fb5d55db3325652b28fa7046faa61e802593f69cfb3c83e82947f7886 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzhBOjE0Rjg4NTpGQkJEQzk6MTQxNjg2RTo2QjAzOThEOSIsInZpc2l0b3JfaWQiOiIyMjA4NzcxNTQwMzI0MTYxNzU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6eef7643f714e574438a1ba69d5f863e9e9d58252c68e65f9ed3e813c949102b |
| hovercard-subject-tag | issue:4367284023 |
| 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/JavaScriptSolidServer/344/issue_layout |
| twitter:image | https://opengraph.githubassets.com/96d52c15a152c612265234de38ad218c8f97c0a0b0a0065b4fd8ee83c14fc4c6/JavaScriptSolidServer/JavaScriptSolidServer/issues/344 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/96d52c15a152c612265234de38ad218c8f97c0a0b0a0065b4fd8ee83c14fc4c6/JavaScriptSolidServer/JavaScriptSolidServer/issues/344 |
| og:image:alt | Summary When serving the HTML view of a stored resource, JSS embeds a JSON-LD data island in the response. This works for resources stored as JSON-LD. For resources stored in Turtle or N3, the data... |
| 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 | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width