FhirOid.fromYaml constructor

FhirOid.fromYaml(
  1. dynamic yaml
)

Implementation

factory FhirOid.fromYaml(dynamic yaml) => yaml is String
    ? FhirOid.fromJson(jsonDecode(jsonEncode(loadYaml(yaml))))
    : yaml is YamlMap
        ? FhirOid.fromJson(jsonDecode(jsonEncode(yaml)))
        : throw YamlFormatException<FhirOid>(
            'FormatException: "$json" is not a valid Yaml string or YamlMap.');