Closed edsu closed 7 months ago
I got pointed to https://github.com/w3c/json-ld-framing/issues/156 by @phochste which seems to confirm that this is not possible with framing?
If you know the language you want and the properties you want, then you can specify those in the frame like it happens here:
And if you wanted to presume that the default language in the incoming document was a particular language (which may/may not be acceptable), you could append a default language context to your incoming document and then frame (or potentially just compact, again, depending on your use case):
Thanks @dlongley that is very helpful! I guess there's no way to to do that for all strings in the document, and would need to be done on a property by property basis?
Thanks @dlongley that is very helpful!
Sure!
I guess there's no way to to do that for all strings in the document, and would need to be done on a property by property basis?
Yeah, it seems that way -- unless there's another trick I've missed.
I think it may be out of scope for Framing and pyld, but I was wondering if there is any way to ensure that string literals either appear as language tagged strings or without them?
For example is there anything I can put in the frame here to ensure that
Semantic Web
is printed out instead of{'@language': 'en', '@value': 'Semantic Web'}
?Or when using the resulting Python object do I always need to check whether
prefLabel
is associated with astr
or adict
depending on how the JSON-LD was published?