René's URL Explorer Experiment


Title: rdf:type with other fields and framing produces wrong output · Issue #242 · jsonld-java/jsonld-java · GitHub

Open Graph Title: rdf:type with other fields and framing produces wrong output · Issue #242 · jsonld-java/jsonld-java

X Title: rdf:type with other fields and framing produces wrong output · Issue #242 · jsonld-java/jsonld-java

Description: This is a simplified version of the problem I'm facing. Having the following json A: { "@context": { "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, "@id": "http://example.com/main/id", "rdf:type": { "@id": "http://example.com/rd...

Open Graph Description: This is a simplified version of the problem I'm facing. Having the following json A: { "@context": { "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, "@id": "http://example.com/main/id", "rd...

X Description: This is a simplified version of the problem I'm facing. Having the following json A: { "@context": { "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, "...

Opengraph URL: https://github.com/jsonld-java/jsonld-java/issues/242

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"rdf:type with other fields and framing produces wrong output","articleBody":"This is a simplified version of the problem I'm facing.\r\n\r\nHaving the following json `A`:\r\n\r\n```json\r\n{\r\n  \"@context\": {\r\n    \"rdf\": \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r\n  },\r\n  \"@id\": \"http://example.com/main/id\",\r\n  \"rdf:type\": {\r\n    \"@id\": \"http://example.com/rdf/id\",\r\n    \"rdf:label\": \"someLabel\"\r\n  }\r\n}\r\n```\r\n\r\nAnd the following framing `B`:\r\n```json\r\n{\r\n  \"@context\" : {\r\n    \"rdf\" : \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r\n  },\r\n  \"@id\" : \"http://example.com/main/id\"\r\n}\r\n```\r\n\r\nAnd here is the code I am using to make the apply the framing (it is in Scala, but the conversion to Java should be Trivial).\r\n\r\n```scala\r\n   // the original Json (A) converted to a Jena Model\r\n   val jsonModel: Model = ???\r\n   // the context of the original Json (A)\r\n   val contextJson: String = ???\r\n   // the framing (B)\r\n   val frame: String = ???\r\n\r\n    val g   = DatasetFactory.wrap(jsonModel).asDatasetGraph\r\n    val out = new ByteArrayOutputStream()\r\n    val w   = RDFDataMgr.createDatasetWriter(RDFFormat.JSONLD_FRAME_FLAT)\r\n    val pm  = RiotLib.prefixMap(g)\r\n    val ctx = new JsonLDWriteContext()\r\n    ctx.setJsonLDContext(contextJson)\r\n    ctx.setFrame(frame)\r\n    Try {\r\n      w.write(out, g, pm, null, ctx)\r\n    }.flatMap(_ =\u003e parse(out.toString).toTry)\r\n```\r\n\r\nThe output generated is wrong:\r\n```json\r\n{\r\n  \"@context\" : {\r\n    \"rdf\" : \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r\n  },\r\n  \"@graph\" : [\r\n    {\r\n      \"@id\" : \"http://example.com/main/id\",\r\n      \"@type\" : \"http://example.com/rdf/id\"\r\n    }\r\n  ]\r\n}\r\n```\r\n...because it is omitting the `label`. I'm expecting the output to be as the input. That's also the behaviour in the [Json-LD Playground](https://json-ld.org/playground/#startTab=tab-framed\u0026json-ld=%7B%22%40context%22%3A%7B%22rdf%22%3A%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%7D%2C%22%40id%22%3A%22http%3A%2F%2Fexample.com%2Fmain%2Fid%22%2C%22rdf%3Atype%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fexample.com%2Frdf%2Fid%22%2C%22rdf%3Alabel%22%3A%22someLabel%22%7D%7D\u0026frame=%7B%22%40context%22%3A%7B%22rdf%22%3A%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%7D%2C%22%40id%22%3A%22http%3A%2F%2Fexample.com%2Fmain%2Fid%22%7D).\r\n\r\nMore weirdly, when using a different predicate than `rdf:type`, the output is correct. So I guess is something related to the special way `rdf:type` (@type) is being treated when framing.","author":{"url":"https://github.com/umbreak","@type":"Person","name":"umbreak"},"datePublished":"2018-09-27T09:30:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/242/jsonld-java/issues/242"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0ea0b5bc-411f-99e5-273b-7c184dd9da6c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC8EE:1EB23C:83DDDE:B78469:69721EC7
html-safe-nonce4d2130cef4cd6e2aaeafa2d1aee5347989cf6d016331e2dbfc9294ecc8f858da
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEVFOjFFQjIzQzo4M0REREU6Qjc4NDY5OjY5NzIxRUM3IiwidmlzaXRvcl9pZCI6IjQ3MTU2MzAyNjc0ODM2OTI3NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4dff89a528baa816e6f98eeeec5c596cfecfae09b5a696afabe19d8c43669313
hovercard-subject-tagissue:364384603
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/jsonld-java/jsonld-java/242/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4dad1808be8de75993fe572598f8cc10f09d9f415b43bee9e2d7d18ec0cc49b3/jsonld-java/jsonld-java/issues/242
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4dad1808be8de75993fe572598f8cc10f09d9f415b43bee9e2d7d18ec0cc49b3/jsonld-java/jsonld-java/issues/242
og:image:altThis is a simplified version of the problem I'm facing. Having the following json A: { "@context": { "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, "@id": "http://example.com/main/id", "rd...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameumbreak
hostnamegithub.com
expected-hostnamegithub.com
None19a0eb237b419e41a3d6a0867abebfdb845544063fc287c8c486f2fc019a590f
turbo-cache-controlno-preview
go-importgithub.com/jsonld-java/jsonld-java git https://github.com/jsonld-java/jsonld-java.git
octolytics-dimension-user_id4359856
octolytics-dimension-user_loginjsonld-java
octolytics-dimension-repository_id2988730
octolytics-dimension-repository_nwojsonld-java/jsonld-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2988730
octolytics-dimension-repository_network_root_nwojsonld-java/jsonld-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4763e8c540bad0a347d6614f8cc684958dcded29
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/jsonld-java/jsonld-java/issues/242#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjsonld-java%2Fjsonld-java%2Fissues%2F242
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjsonld-java%2Fjsonld-java%2Fissues%2F242
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=jsonld-java%2Fjsonld-java
Reloadhttps://github.com/jsonld-java/jsonld-java/issues/242
Reloadhttps://github.com/jsonld-java/jsonld-java/issues/242
Reloadhttps://github.com/jsonld-java/jsonld-java/issues/242
jsonld-java https://github.com/jsonld-java
jsonld-javahttps://github.com/jsonld-java/jsonld-java
Notifications https://github.com/login?return_to=%2Fjsonld-java%2Fjsonld-java
Fork 153 https://github.com/login?return_to=%2Fjsonld-java%2Fjsonld-java
Star 386 https://github.com/login?return_to=%2Fjsonld-java%2Fjsonld-java
Code https://github.com/jsonld-java/jsonld-java
Issues 46 https://github.com/jsonld-java/jsonld-java/issues
Pull requests 8 https://github.com/jsonld-java/jsonld-java/pulls
Actions https://github.com/jsonld-java/jsonld-java/actions
Projects 0 https://github.com/jsonld-java/jsonld-java/projects
Wiki https://github.com/jsonld-java/jsonld-java/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/jsonld-java/jsonld-java/security
Please reload this pagehttps://github.com/jsonld-java/jsonld-java/issues/242
Insights https://github.com/jsonld-java/jsonld-java/pulse
Code https://github.com/jsonld-java/jsonld-java
Issues https://github.com/jsonld-java/jsonld-java/issues
Pull requests https://github.com/jsonld-java/jsonld-java/pulls
Actions https://github.com/jsonld-java/jsonld-java/actions
Projects https://github.com/jsonld-java/jsonld-java/projects
Wiki https://github.com/jsonld-java/jsonld-java/wiki
Security https://github.com/jsonld-java/jsonld-java/security
Insights https://github.com/jsonld-java/jsonld-java/pulse
New issuehttps://github.com/login?return_to=https://github.com/jsonld-java/jsonld-java/issues/242
New issuehttps://github.com/login?return_to=https://github.com/jsonld-java/jsonld-java/issues/242
rdf:type with other fields and framing produces wrong outputhttps://github.com/jsonld-java/jsonld-java/issues/242#top
https://github.com/umbreak
https://github.com/umbreak
umbreakhttps://github.com/umbreak
on Sep 27, 2018https://github.com/jsonld-java/jsonld-java/issues/242#issue-364384603
Json-LD Playgroundhttps://json-ld.org/playground/#startTab=tab-framed&json-ld=%7B%22%40context%22%3A%7B%22rdf%22%3A%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%7D%2C%22%40id%22%3A%22http%3A%2F%2Fexample.com%2Fmain%2Fid%22%2C%22rdf%3Atype%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fexample.com%2Frdf%2Fid%22%2C%22rdf%3Alabel%22%3A%22someLabel%22%7D%7D&frame=%7B%22%40context%22%3A%7B%22rdf%22%3A%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%7D%2C%22%40id%22%3A%22http%3A%2F%2Fexample.com%2Fmain%2Fid%22%7D
@typehttps://github.com/type
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.