{"html_url": "https://github.com/simonw/datasette/issues/1942#issuecomment-1344959032", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1942", "id": 1344959032, "node_id": "IC_kwDOBm6k_c5QKnI4", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-10T01:11:26Z", "updated_at": "2022-12-10T01:11:26Z", "author_association": "OWNER", "body": "One way this could work: if plugins request it, a block like this is added to the page:\r\n\r\n```html\r\n\r\n```\r\nThen a function could be provided which extracts and parses that data:\r\n```javascript\r\nvar data = await datasette.jsonData();\r\n```\r\nWhy an `await`? Because then I could have it work the exact same way if the data is NOT available on the page - it could trigger a `fetch()` call for the same stuff. So loading it on the page becomes an optional performance optimization.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1487738738, "label": "Option for plugins to request that JSON be served on the page"}, "performed_via_github_app": null}