Title: Support JSON-LD data islands in HTML pages · Issue #5 · JavaScriptSolidServer/solid-shim · GitHub
Open Graph Title: Support JSON-LD data islands in HTML pages · Issue #5 · JavaScriptSolidServer/solid-shim
X Title: Support JSON-LD data islands in HTML pages · Issue #5 · JavaScriptSolidServer/solid-shim
Description: Problem When browsing to an HTML page like https://jsonos.com/examples/organization.html, the browser shows nothing because rdflib's Fetcher doesn't extract JSON-LD data islands from HTML responses. Current behavior: User browses to orga...
Open Graph Description: Problem When browsing to an HTML page like https://jsonos.com/examples/organization.html, the browser shows nothing because rdflib's Fetcher doesn't extract JSON-LD data islands from HTML responses...
X Description: Problem When browsing to an HTML page like https://jsonos.com/examples/organization.html, the browser shows nothing because rdflib's Fetcher doesn't extract JSON-LD data islands from HTML r...
Opengraph URL: https://github.com/JavaScriptSolidServer/solid-shim/issues/5
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support JSON-LD data islands in HTML pages","articleBody":"## Problem\n\nWhen browsing to an HTML page like `https://jsonos.com/examples/organization.html`, the browser shows nothing because rdflib's Fetcher doesn't extract JSON-LD data islands from HTML responses.\n\n**Current behavior:**\n1. User browses to `organization.html`\n2. Server returns `Content-Type: text/html`\n3. rdflib Fetcher doesn't know how to parse HTML\n4. Empty store, nothing renders\n\n**Expected behavior:**\n1. User browses to `organization.html` \n2. solid-shim detects HTML response\n3. Extracts `\u003cscript type=\"application/ld+json\"\u003e` content\n4. Parses JSON-LD into store\n5. Renders with appropriate pane (or @view if specified)\n\n## Background\n\nJSON-LD data islands are part of the JSON-LD spec and widely used (Google's structured data, schema.org markup, etc.). The browser should handle them natively.\n\n## Proposed Solution\n\nHook into rdflib's Fetcher or add a custom handler:\n\n```javascript\n// When fetching a URL\nconst response = await fetch(url)\nconst contentType = response.headers.get('content-type')\n\nif (contentType?.includes('text/html')) {\n const html = await response.text()\n const doc = new DOMParser().parseFromString(html, 'text/html')\n const jsonLdScript = doc.querySelector('script[type=\"application/ld+json\"]')\n \n if (jsonLdScript) {\n const data = JSON.parse(jsonLdScript.textContent)\n parseJsonLdToStore(data, url, store)\n // Render with @view or type-based pane\n }\n}\n```\n\n## Related\n\n- json-os/json-os.github.io#1 - The @view proposal\n- solid-shim#4 - @view predicate support","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-01-06T22:51:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/5/solid-shim/issues/5"}
| 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:8577de34-5fcc-e61b-7cbb-2e60fddceab0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9AEE:130A5E:126349D:18BDC39:69797023 |
| html-safe-nonce | 5781bf36e3b3352f225231f8f1c5ff202f103ba27686273424279c8ac763426a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUVFOjEzMEE1RToxMjYzNDlEOjE4QkRDMzk6Njk3OTcwMjMiLCJ2aXNpdG9yX2lkIjoiMTc5MTA5MzYzNjAyNTE4MDUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ca4d14aa54a8802ca4c6b3ef6d7d51324ae4bee573e9f48d003cc54e5d0a1223 |
| hovercard-subject-tag | issue:3786773147 |
| 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/5/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e85c08624757b89b72869254e90ce377bdde29a98507c8058130185497bcb51b/JavaScriptSolidServer/solid-shim/issues/5 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e85c08624757b89b72869254e90ce377bdde29a98507c8058130185497bcb51b/JavaScriptSolidServer/solid-shim/issues/5 |
| og:image:alt | Problem When browsing to an HTML page like https://jsonos.com/examples/organization.html, the browser shows nothing because rdflib's Fetcher doesn't extract JSON-LD data islands from HTML responses... |
| 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 | c049b65ec7e54cbf2521f5a560b6527714c612b0bd169188e2ea6e16f83bd5f4 |
| 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 | 87b137883e35e2766c3d0f6a257c4044f6390b83 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width