Linked Art in C#

object/nightwatch/5 matches the site

Similar to the Production example in the basic patterns, "The Night Watch" was created by Rembrandt in Amsterdam in 1642.

On linked.art: Object Production and Destruction › Base Production Activity · site JSON · type HumanMadeObject · ProductionDestruction.NightWatch_5_Production

C#

public static HumanMadeObject NightWatch_5_Production()
{
    var nightWatch = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/nightwatch/5")
        .WithLabel("Night Watch by Rembrandt");

    nightWatch.ProducedBy = new Production()
        {
            TimeSpan = LinkedArtTimeSpan.FromYear(1642).WithLabel("1642"),
            TookPlaceAt = [
                new Place()
                .WithId("https://linked.art/example/place/amsterdam")
                .WithLabel("Amsterdam")
            ],
            CarriedOutBy = [
                new Person()
                .WithId("https://linked.art/example/person/rembrandt")
                .WithLabel("Rembrandt")
            ]
        };

    return nightWatch;
}

JSON from the C#

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/5",
  "type": "HumanMadeObject",
  "_label": "Night Watch by Rembrandt",
  "produced_by": {
    "type": "Production",
    "carried_out_by": [
      {
        "id": "https://linked.art/example/person/rembrandt",
        "type": "Person",
        "_label": "Rembrandt"
      }
    ],
    "timespan": {
      "type": "TimeSpan",
      "_label": "1642",
      "begin_of_the_begin": "1642-01-01T00:00:00Z",
      "end_of_the_end": "1642-12-31T23:59:59Z"
    },
    "took_place_at": [
      {
        "id": "https://linked.art/example/place/amsterdam",
        "type": "Place",
        "_label": "Amsterdam"
      }
    ]
  }
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/5",
  "type": "HumanMadeObject",
  "_label": "Night Watch by Rembrandt",
  "produced_by": {
    "type": "Production",
    "timespan": {
      "type": "TimeSpan",
      "_label": "1642",
      "begin_of_the_begin": "1642-01-01T00:00:00Z",
      "end_of_the_end": "1642-12-31T23:59:59Z"
    },
    "took_place_at": [
      {
        "id": "https://linked.art/example/place/amsterdam",
        "type": "Place",
        "_label": "Amsterdam"
      }
    ],
    "carried_out_by": [
      {
        "id": "https://linked.art/example/person/rembrandt",
        "type": "Person",
        "_label": "Rembrandt"
      }
    ]
  }
}

Comparison

The two documents are equivalent (property order ignored, array order significant).

Properties used

begin_of_the_begin carried_out_by end_of_the_end produced_by timespan took_place_at