FhirUuid.fromYaml constructor

FhirUuid.fromYaml(
  1. dynamic yaml
)

Implementation

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