json-ld / json-ld.org

JSON for Linked Data's documentation and playground site
https://json-ld.org/
Other
856 stars 152 forks source link

scoped context in `@nest` property does not work in playground #737

Open pchampin opened 4 years ago

pchampin commented 4 years ago

playground

{
  "@context": {
    "name": {
      "@id": "@nest",
      "@context": {
        "first": "http://schema.org/givenName",
        "last": "http://schema.org/familyName"
      }
    }
  },

  "name": {
    "first": "Pierre-Antoine",
    "last": "Champin"
  }
}

should expand to

[
  {
    "http://schema.org/givenName": [
      {
        "@value": "Pierre-Antoine"
      }
    ],
    "http://schema.org/familyName": [
      {
        "@value": "Champin"
      }
    ]
  }
]

but in the playground, it expands to an empty list...

gkellogg commented 4 years ago

Nesting and scoped-contexts need work post 1.1.

pchampin commented 4 years ago

Darn, I was not entirely sure it was supposed to work, but I was too lazy to go back to the algorithm, and just checked on the Ruby distiller, which seems to support it...

timothee-haudebourg commented 1 year ago

I just noticed this as well. My Rust implementation also supports it.