Table of Contents

Class SchemaOrgQuantitativeValue

Namespace
Dynamicweb.Ecommerce.ProductCatalog.SchemaOrg
Assembly
Dynamicweb.Ecommerce.dll

Represents a Schema.org QuantitativeValue (https://schema.org/QuantitativeValue) used for JSON-LD generation. Used for the measurable product properties such as weight, width, height and depth. Properties with a null value are omitted from the serialized JSON-LD output.

public sealed class SchemaOrgQuantitativeValue
Inheritance
SchemaOrgQuantitativeValue
Inherited Members

Remarks

Sealed on purpose: ToJsonLd(SchemaOrgProduct?) only makes the root model polymorphic, and this type is reachable solely as a property of SchemaOrgProduct, which the serializer writes by its declared type - a derived model's additional properties would be dropped from the output.

Properties

Type

The Schema.org type. Defaults to 'QuantitativeValue'.

[JsonPropertyName("@type")]
public string Type { get; set; }

Property Value

string

UnitCode

The unit of measurement as a UN/CEFACT Common Code, i.e. 'KGM' or 'CMT'.

[JsonPropertyName("unitCode")]
public string? UnitCode { get; set; }

Property Value

string

UnitText

The unit of measurement as a free text string, i.e. 'kg' or 'cm'.

[JsonPropertyName("unitText")]
public string? UnitText { get; set; }

Property Value

string

Value

The numeric value of the measurement.

[JsonPropertyName("value")]
public double? Value { get; set; }

Property Value

double?

See Also

To top