Skip to content
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

For JSON-LD serialization, default language context MUST be set using @context #21

Closed
jasnell opened this issue Oct 3, 2014 · 6 comments

Comments

@jasnell
Copy link
Collaborator

jasnell commented Oct 3, 2014

In the original AS 2.0 draft, the default language context was set using the "language" property... e.g.

{
  "language": "en", 
  "displayName": "foo"
}

The only way to do this using a pure JSON-LD approach is to use:

{
  "@context": {"@language": "en"}, 
  "displayName": "foo"
}
@akuckartz
Copy link

The relevant part of the JSON-LD spec: http://www.w3.org/TR/json-ld/#string-internationalization

@elf-pavlik
Copy link
Member

I think that also relates to ACTION-2: Describe how as2 diverges from json-ld and manages the compatibility since standard JSON-LD parser will not understand information about default language if set outside of @context
I also added note linking to this issue from action in W3C Tracker

@jasnell
Copy link
Collaborator Author

jasnell commented Oct 6, 2014

Issue is relatively minor. It just means that we end up having to manually pre- and post-process Natural Language Values by injecting @language tags into Language Maps following JSON-LD expansion.

@elf-pavlik
Copy link
Member

Just to collect all such information in one place i started this section on W3C wiki and linked to this issue: https://www.w3.org/wiki/Activity_Streams#JSON-LD

@elf-pavlik
Copy link
Member

Found more proper place, my bad with first try!
https://www.w3.org/wiki/Activity_Streams/JSON-LD

@jasnell
Copy link
Collaborator Author

jasnell commented Dec 4, 2014

Covered in current editor's draft

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

No branches or pull requests

4 participants