Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Make clear how type and language coercions work #64

Closed
lanthaler opened this Issue Jan 23, 2012 · 4 comments

Comments

Projects
None yet
2 participants
Owner

msporny commented Feb 5, 2012

As a general rule, in JSON-LD, if somebody uses expanded form, they mean exactly what is in expanded form. For your example above, the occupation 科学者 wouldn't be tagged with a language tag since the author was expressing a plain literal. That is, they wouldn't have gone to the trouble of marking it up in expanded form if they wanted the @language tag to apply to it.

I could go either way on "@language": null clearing the default language in the current profile. We might as well support it because we've supported other uses of 'null' clearing certain aspects of the coercion rules.

PROPOSAL: When expanded form is used, no type coercion rules apply to the value expressed in the expanded form.

PROPOSAL: Setting @language to null in the @context clears any coercion rules for language for the JSON subtree. Setting @language to null in expanded value form clears any language information / has no effect.

Member

lanthaler commented Feb 6, 2012

+1 to both

Owner

msporny commented Feb 21, 2012

RESOLVED: When expanded form is used, no coercion rules apply to the value expressed in the expanded form.

RESOLVED: Setting @language to null in the @context clears any coercion rules for language for the JSON subtree.

Owner

msporny commented Feb 21, 2012

RESOLVED: If "@language": null is specified in a local context, language coercion is removed from the active context.

@lanthaler lanthaler closed this in 7d2be86 Feb 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment