Linked Art in C#

object/spring/4 matches the site

"Spring" was produced in a Production activity carried out by Manet in 1881, somewhere in France.

On linked.art: Basic Patterns › Events and Activities · site JSON · type HumanMadeObject · BasicPatterns.Spring_4_Production

C#

public static HumanMadeObject Spring_4_Production()
{
    var spring = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/spring/4")
        .WithLabel("Jeanne (Spring) by Manet");


    spring.ProducedBy =
        new Production()
        {
            // https://linked.art/example/object/spring/4.json has no Z timespan
            TimeSpan = LinkedArtTimeSpan.FromYear(1881).WithLabel("1881"),
            TookPlaceAt = [
                new Place()
                    .WithId("https://linked.art/example/place/france")
                    .WithLabel("France")
            ],
            CarriedOutBy = [
                new Person()
                    .WithId("https://linked.art/example/person/manet")
                    .WithLabel("Manet")
            ],
            During = [
                new Period()
                    .WithId("https://linked.art/example/event/19c")
                    .WithLabel("19th Century")
            ]
        };

    return spring;
}

JSON from the C#

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/spring/4",
  "type": "HumanMadeObject",
  "_label": "Jeanne (Spring) by Manet",
  "produced_by": {
    "type": "Production",
    "carried_out_by": [
      {
        "id": "https://linked.art/example/person/manet",
        "type": "Person",
        "_label": "Manet"
      }
    ],
    "timespan": {
      "type": "TimeSpan",
      "_label": "1881",
      "begin_of_the_begin": "1881-01-01T00:00:00Z",
      "end_of_the_end": "1881-12-31T23:59:59Z"
    },
    "took_place_at": [
      {
        "id": "https://linked.art/example/place/france",
        "type": "Place",
        "_label": "France"
      }
    ],
    "during": [
      {
        "id": "https://linked.art/example/event/19c",
        "type": "Period",
        "_label": "19th Century"
      }
    ]
  }
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/spring/4",
  "type": "HumanMadeObject",
  "_label": "Jeanne (Spring) by Manet",
  "produced_by": {
    "type": "Production",
    "timespan": {
      "type": "TimeSpan",
      "_label": "1881",
      "begin_of_the_begin": "1881-01-01T00:00:00Z",
      "end_of_the_end": "1881-12-31T23:59:59Z"
    },
    "took_place_at": [
      {
        "id": "https://linked.art/example/place/france",
        "type": "Place",
        "_label": "France"
      }
    ],
    "carried_out_by": [
      {
        "id": "https://linked.art/example/person/manet",
        "type": "Person",
        "_label": "Manet"
      }
    ],
    "during": [
      {
        "id": "https://linked.art/example/event/19c",
        "type": "Period",
        "_label": "19th Century"
      }
    ]
  }
}

Comparison

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

Properties used

begin_of_the_begin carried_out_by during end_of_the_end produced_by timespan took_place_at