-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type Coercion / Node Conversion #98
Comments
I have an idea for a future version of JSON-LD Framing. As a web developer, I would like to receive a JSON document from i.e. a simple API, add a A common response from such an API may include an "id" property as a number (as it is indexed in the source database as an integer), so after applying the {
"@context": {
"@base": "http://starwars.com/",
"@vocab": "http://starwars.com/",
"id": "@id",
"type": "@type"
},
"id": 123,
"type": "Human",
"firstName": "Luke",
"lastName": "Skywalker"
} The expansion step will generate an error:
This makes sense, but my intention in declaring the The alternative would be a blank node with a custom ID property, which is less useful in certain situations. I propose a framing solution that generates a new triple with the coerced XSD type and removes the original, so that when flattened, it becomes:
As a starting point, I suggest adding a term called |
This would probably be in compaction/expansion rather than framing. It is somewhat similar to the It’s a common idiom in JSON, so it’s worthy of future consideration. |
Thanks! I opened a new issue in the other repo. If that's right, this can be closed. |
(See below)
The text was updated successfully, but these errors were encountered: