w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
112 stars 22 forks source link

example 67 uses not best practice of node embedded context #250

Closed azaroth42 closed 4 years ago

azaroth42 commented 5 years ago

And instead I think we would now recommend to use a scoped context, no?

{
  "@context": {
    ...
    "@language": "ja"
  },
  "name": "花澄",
  "details": {
    "@context": {
      "@language": null
    },
    "occupation": "Ninja"
  }
}

Would become

{
  "@context": {
    ...
    "details": {
      "@context": {
        "@language": null
      }
    },
    "@language": "ja"
  },
  "name": "花澄",
  "details": {
    "occupation": "Ninja"
  }
}

This pattern should at least be demonstrated, even if 67 isn't changed

gkellogg commented 4 years ago

I don't know if we've said that embedded contexts aren't best practices, but I see no harm in updating the example.