Skip to content

Recursively nested properties and compaction #391

Open
@pchampin

Description

@pchampin

Following the discussion in #380, I have a question:

Consider the following data:

{
  "@context": {
    "foo": "http://example.org/foo",
    "bar": "http://example.org/bar",
    "baz": "http://example.org/baz",
    "n1": "@nest",
    "n2": "@nest"
  },
  "foo": "FOO",
  "n1": {
    "bar": "BAR",
    "n2": {
      "baz": "BAZ"
    }
  }
}

Can I expand it and compact it back to the same shape (including the doubly-nested property baz)?

I gave it a try there but with no luck.

If this is indeed impossible, I'm not suggesting we should fix it now. But I'm trying to decide how bad it is if we introduce an asymmetry between expansion and compaction wrt nested properties in #388. If it appears that the asymetry is already there (in the example above), that would help be byte the bullet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    defer-future-versionDefer this issue until a future version of JSON-LD

    Type

    No type

    Projects

    Status

    Future Work

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions