-
Notifications
You must be signed in to change notification settings - Fork 32
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
Option to compact terms but not values #3
Comments
Seems similar to the |
👍 to this issue. It's the same use case as #6, and similar to the requirement that led to adding Similarly, |
Maybe if the context was something like the following: {
"@context": {
"foo": {"@id": "http://example.com/foo", "@type": "@none", "@container": "@set"},
"bar": {"@id": "http://example.com/bar", "@type": "@none", "@container": "@set"},
},
"@graph": [{
"foo": [{"@value" : "foo-value"}],
"bar": [{"@value": "bar-value", "@language": "en"}]
}]
} The We'd need to figure out the term matching precedence of this over other potentially matching terms, presumably match first. |
For consistency with #6, how about (sigh) a new keyword? |
Note that there is a difference in the context use when expanding vs compacting, and that the API allows for a separate {
"@context": {
"@base": "http://example.org/",
"foo": {"@id": "http://example.com/foo", "@type": "@id"},
"bar": {"@id": "http://example.com/bar", "@language": "en"}
},
"foo": "foo-value",
"bar": "bar-value"
} If using itself as an [{
"http://example.com/foo": [{"@id": "http://example.org/foo-value"}],
"http://example.com/bar": [{"@value": "bar-value", "@language": "en"}]
}] Compact using the context from the earlier example would generate the results as I had suggested: {
"@context": {
"foo": {"@id": "http://example.com/foo", "@type": "@none", "@container": "@set"},
"bar": {"@id": "http://example.com/bar", "@type": "@none", "@container": "@set"},
},
"@graph": [{
"foo": [{"@value" : "foo-value"}],
"bar": [{"@value": "bar-value", "@language": "en"}]
}]
} Note that if |
There could be two contexts, but I don't know of any project or spec that does that. I think the cost of a new keyword (or similar) is much lower than making everyone create two contexts if they want this sort of functionality. -0.9 |
JSON-LD has always had the notion of expanding an input and re-compacting with a new context, so there's really nothing new here. No new keyword necessary. If you don't like the |
WG resolved that the use case for #3 and #6 are important, and should have a single solution to be discussed in a separate combined issue: #33 |
_This was raised by Fabian Steeg:_
Original issue Option to compact terms but not values #338.
The text was updated successfully, but these errors were encountered: