Skip to content

Support "@default" inside properties in framing when using sets #167

@hmottestad

Description

@hmottestad

Frame

{
  "@context": {
    "dc": "http://purl.org/dc/elements/1.1/",
    "ex": "http://example.org/vocab#"
  },
  "@type": "ex:Library",
  "ex:contains": {
    "@explicit":true,
    "dc:title":{"@default":"Title missing"},
    "dc:creator":{}
  }
}

Data

{
  "@context": {
    "dc": "http://purl.org/dc/elements/1.1/",
    "ex": "http://example.org/vocab#"
  },
  "@graph": [
    {
      "@id": "http://example.org/library",
      "@type": "ex:Library",
      "ex:contains": [{"@id":"http://example.org/library/the-republic#introduction"},{"@id":"http://example.org/library/the-republic"}]
    },
    {
      "@id": "http://example.org/library/the-republic",
      "@type": "ex:Book",
      "dc:creator": "Plato",
      "dc:title": "The Republic"
    },
    {
      "@id": "http://example.org/library/the-republic#introduction",
      "@type": "ex:Book",
            "dc:creator": "Plato"
    }
  ]
}

Expected result

{
  "@context": {
    "dc": "http://purl.org/dc/elements/1.1/",
    "ex": "http://example.org/vocab#"
  },
  "@graph": [
    {
      "@id": "http://example.org/library",
      "@type": "ex:Library",
      "ex:contains": [
        {
          "@id": "http://example.org/library/the-republic#introduction",
          "@type": "ex:Book",
          "dc:creator": "Plato",
          "dc:title": "Title missing"
        },
        {
          "@id": "http://example.org/library/the-republic",
          "@type": "ex:Book",
          "dc:creator": "Plato",
          "dc:title": "The Republic"
        }
      ]
    }
  ]
}

Actual result

{
  "@context": {
    "dc": "http://purl.org/dc/elements/1.1/",
    "ex": "http://example.org/vocab#"
  },
  "@graph": [
  {
    "@id": "http://example.org/library",
    "@type": "ex:Library",
    "ex:contains": {
      "@id": "http://example.org/library/the-republic",
      "@type": "ex:Book",
      "dc:creator": "Plato",
      "dc:title": "The Republic"
    }
  }
]
}



Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions