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.
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;
}
var humanMadeObject = new HumanMadeObject
{
Context = ["https://linked.art/ns/v1/linked-art.json"],
Id = "https://linked.art/example/object/nightwatch/5",
Label = "Night Watch by Rembrandt",
ProducedBy = new Production
{
CarriedOutBy =
[
new Person
{
Id = "https://linked.art/example/person/rembrandt",
Label = "Rembrandt",
},
],
TimeSpan = new LinkedArtTimeSpan
{
Label = "1642",
BeginOfTheBegin = new LinkedArtDate(1642, 1, 1),
EndOfTheEnd = new LinkedArtDate(1642, 12, 31, 23, 59, 59),
},
TookPlaceAt =
[
new Place
{
Id = "https://linked.art/example/place/amsterdam",
Label = "Amsterdam",
},
],
},
};
Generated from the object the example builds: every property that is set, as object initialisers, with the vocabulary constants where a term is in the registry. The fluent helpers are a convenience, not a requirement; this form and the one as written produce the same JSON.
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).