FhirUri.fromYaml constructor

FhirUri.fromYaml(
  1. dynamic yaml
)

Implementation

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