Skip to content

Conversation

gkellogg
Copy link
Member

Adding a minimal/empty property-scoped context should not affect the using terms defined in outer context.

From w3c/wot-thing-description#894.

@davidlehn
Copy link
Contributor

Perhaps also add an even more minimal test. Surprised this wasn't covered before.
in:

{
  "ex:title": "top",
  "ex:thing": {
    "ex:title": "sub"
  }
}

context:

{
  "@context": {
    "thing": {
      "@id": "ex:thing",
      "@context": {}
    },
    "title": "ex:title"
  }
}

out:

{
  "@context": {
    "thing": {
      "@id": "ex:thing",
      "@context": {}
    },
    "title": "ex:title"
  },
  "title": "top",
  "thing": {
    "title": "sub"
  }
}

And while we're at it, how about a basic expand test that jsonld.js also is failing now. How was this also not covered?
in:

{
  "@context": {
    "thing": {
      "@id": "ex:thing",
      "@context": {}
    },
    "title": "ex:title"
  },
  "title": "top",
  "thing": {
    "title": "sub"
  }
}

out:

[
  {
    "ex:title": [
      {
        "@value": "top"
      }
    ],
    "ex:thing": [
      {
        "ex:title": [
          {
            "@value": "sub"
          }
        ]
      }
    ]
  }
]

@davidlehn
Copy link
Contributor

This is named with "minimal/empty" contexts, but in the case of jsonld.js, I think any non-null context data fails. This may be a general additive context issue.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants