Title: Parsing breaks on JSON-LD 1.1 `@version` keyword. · Issue #263 · jsonld-java/jsonld-java · GitHub
Open Graph Title: Parsing breaks on JSON-LD 1.1 `@version` keyword. · Issue #263 · jsonld-java/jsonld-java
X Title: Parsing breaks on JSON-LD 1.1 `@version` keyword. · Issue #263 · jsonld-java/jsonld-java
Description: The graphToRdf function in RDFDataset.java checks whether any of the keys in the JSON document are reserved JSON-LD keywords. As JsonLdUtils.isKeyword() doesn't know of @version (introduced in 1.1), it then tries to interpret its value, ...
Open Graph Description: The graphToRdf function in RDFDataset.java checks whether any of the keys in the JSON document are reserved JSON-LD keywords. As JsonLdUtils.isKeyword() doesn't know of @version (introduced in 1.1)...
X Description: The graphToRdf function in RDFDataset.java checks whether any of the keys in the JSON document are reserved JSON-LD keywords. As JsonLdUtils.isKeyword() doesn't know of @version (introduced in ...
Opengraph URL: https://github.com/jsonld-java/jsonld-java/issues/263
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parsing breaks on JSON-LD 1.1 `@version` keyword.","articleBody":"The `graphToRdf` function in `RDFDataset.java` checks whether any of the keys in the JSON document are reserved JSON-LD keywords. As `JsonLdUtils.isKeyword()` doesn't know of `@version` (introduced in 1.1), it then tries to interpret its value, which fails.\r\n\r\nSolution: add ``|| \"@version\".equals(key)`` to the `isKeyword` function in `JsonLdUtils.java`:\r\n\r\n```\r\n /**\r\n * Returns whether or not the given value is a keyword (or a keyword alias).\r\n *\r\n * @param v\r\n * the value to check.\r\n * @param [ctx]\r\n * the active context to check against.\r\n *\r\n * @return true if the value is a keyword, false if not.\r\n */\r\n static boolean isKeyword(Object key) {\r\n if (!isString(key)) {\r\n return false;\r\n }\r\n return \"@base\".equals(key) || \"@context\".equals(key) || \"@container\".equals(key)\r\n || \"@default\".equals(key) || \"@embed\".equals(key) || \"@explicit\".equals(key)\r\n || \"@graph\".equals(key) || \"@id\".equals(key) || \"@index\".equals(key)\r\n || \"@language\".equals(key) || \"@list\".equals(key) || \"@omitDefault\".equals(key)\r\n || \"@reverse\".equals(key) || \"@preserve\".equals(key) || \"@set\".equals(key)\r\n || \"@type\".equals(key) || \"@value\".equals(key) || \"@vocab\".equals(key)\r\n || \"@requireAll\".equals(key) || \"@version\".equals(key);\r\n }\r\n```","author":{"url":"https://github.com/RinkeHoekstra","@type":"Person","name":"RinkeHoekstra"},"datePublished":"2019-06-21T08:54:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/263/jsonld-java/issues/263"}
| 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:4f0bf839-7eaa-f8e1-6603-76b2d3b9e044 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA7A:1B8E26:21A1FA1:2B92386:697472EB |
| html-safe-nonce | 1c91cd5691c98551f178a11b31c7e839314dce20361450164e6f9aaeea894a16 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTdBOjFCOEUyNjoyMUExRkExOjJCOTIzODY6Njk3NDcyRUIiLCJ2aXNpdG9yX2lkIjoiMzMyMjU3MDMxMTEwMjkyMjAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bef73473f0fd37801481dd217f4e0309e54c92050ed76f6baf57ffded57abd6c |
| hovercard-subject-tag | issue:459088212 |
| 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/jsonld-java/jsonld-java/263/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50f51fef01b729694b6aca5e4e7a0d431d3118622e9916812eccc718cb13e1b9/jsonld-java/jsonld-java/issues/263 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50f51fef01b729694b6aca5e4e7a0d431d3118622e9916812eccc718cb13e1b9/jsonld-java/jsonld-java/issues/263 |
| og:image:alt | The graphToRdf function in RDFDataset.java checks whether any of the keys in the JSON document are reserved JSON-LD keywords. As JsonLdUtils.isKeyword() doesn't know of @version (introduced in 1.1)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RinkeHoekstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c |
| turbo-cache-control | no-preview |
| go-import | github.com/jsonld-java/jsonld-java git https://github.com/jsonld-java/jsonld-java.git |
| octolytics-dimension-user_id | 4359856 |
| octolytics-dimension-user_login | jsonld-java |
| octolytics-dimension-repository_id | 2988730 |
| octolytics-dimension-repository_nwo | jsonld-java/jsonld-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2988730 |
| octolytics-dimension-repository_network_root_nwo | jsonld-java/jsonld-java |
| 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 | 56fe7e2e8de6e57740bca50402351ea656f7a4bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width