Skip to content

[Question] How to do an array of arrays in a JSON-LD @context #414

@melvincarvalho

Description

@melvincarvalho

Hi All

I need to create a context that models an array of arrays, and I was wondering how to do it.

Possibility 1: "tags": {"@container": "@list", "@type": "@list" }

{
  "@context": {
    "@version": 1.1,
    "@vocab": "http://example.org/",
    "tags": {
      "@container": "@list",
      "@type": "@list"
    }
  },
  "tags": [
    ["A", "B", "C"],
    ["D", "E", "F"],
    ["G", "H", "I"]
  ]
}

Possibility 2: "tags": {"@container": "@list"}

{
  "@context": {
    "@vocab": "http://example.org/",
    "tags": {"@container": "@list"}
  },
  "tags": [
    ["A", "B", "C"],
    ["D", "E", "F"],
    ["G", "H", "I"]
  ]
}

Possibility 3: Other (?)

Any help greatly appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions