json-ld.org icon indicating copy to clipboard operation
json-ld.org copied to clipboard

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

Open pchampin opened this issue 5 years ago • 3 comments

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...

pchampin avatar Jul 09 '20 15:07 pchampin

Nesting and scoped-contexts need work post 1.1.

gkellogg avatar Jul 09 '20 21:07 gkellogg

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...

pchampin avatar Jul 10 '20 07:07 pchampin