toJsonLd method
Serialize SchemaObservation to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
'@context': 'https://schema.org',
'@type': 'Observation',
'marginOfError':
convertToJsonLd(marginOfError, [SchemaQuantitativeValue]),
'measuredProperty': convertToJsonLd(measuredProperty, [SchemaProperty]),
'measurementDenominator': convertToJsonLd(
measurementDenominator, [SchemaStatisticalVariable]),
'measurementMethod': convertToJsonLd(measurementMethod,
[SchemaDefinedTerm, SchemaMeasurementMethodEnum, String, String]),
'measurementQualifier':
convertToJsonLd(measurementQualifier, [SchemaEnumeration]),
'measurementTechnique': convertToJsonLd(measurementTechnique,
[SchemaDefinedTerm, SchemaMeasurementMethodEnum, String, String]),
'observationAbout':
convertToJsonLd(observationAbout, [SchemaPlace, SchemaThing]),
'observationDate': convertToJsonLd(observationDate, [String]),
'observationPeriod': convertToJsonLd(observationPeriod, [String]),
'variableMeasured': convertToJsonLd(variableMeasured, [
SchemaProperty,
SchemaPropertyValue,
SchemaStatisticalVariable,
String
]),
'additionalProperty':
convertToJsonLd(additionalProperty, [SchemaPropertyValue]),
'maxValue': convertToJsonLd(maxValue, [int]),
'minValue': convertToJsonLd(minValue, [int]),
'unitCode': convertToJsonLd(unitCode, [String, String]),
'unitText': convertToJsonLd(unitText, [String]),
'value':
convertToJsonLd(value, [String, SchemaStructuredValue, bool, int]),
'valueReference': convertToJsonLd(valueReference, [
SchemaDefinedTerm,
SchemaEnumeration,
SchemaMeasurementTypeEnumeration,
SchemaPropertyValue,
SchemaQualitativeValue,
SchemaQuantitativeValue,
String,
SchemaStructuredValue
]),
'additionalType': convertToJsonLd(additionalType, [String, String]),
'alternateName': convertToJsonLd(alternateName, [String]),
'description': convertToJsonLd(description, [String, SchemaTextObject]),
'disambiguatingDescription':
convertToJsonLd(disambiguatingDescription, [String]),
'identifier':
convertToJsonLd(identifier, [SchemaPropertyValue, String, String]),
'image': convertToJsonLd(image, [SchemaImageObject, String]),
'mainEntityOfPage':
convertToJsonLd(mainEntityOfPage, [SchemaCreativeWork, String]),
'name': convertToJsonLd(name, [String]),
'potentialAction': convertToJsonLd(potentialAction, [SchemaAction]),
'sameAs': convertToJsonLd(sameAs, [String]),
'subjectOf':
convertToJsonLd(subjectOf, [SchemaCreativeWork, SchemaEvent]),
'url': convertToJsonLd(url, [String]),
});