/// <inheritdoc cref="ToXmlAsync(ITypedElement, FhirXmlSerializationSettings)" /> public static string ToXml(this ITypedElement source, FhirXmlSerializationSettings settings = null) => SerializationUtil.WriteXmlToString(writer => source.WriteTo(writer, settings), settings?.Pretty ?? false, settings?.AppendNewLine ?? false);
/// <inheritdoc cref="ToXmlBytesAsync(ITypedElement, FhirXmlSerializationSettings)" /> public static byte[] ToXmlBytes(this ITypedElement source, FhirXmlSerializationSettings settings = null) => SerializationUtil.WriteXmlToBytes(writer => source.WriteTo(writer, settings));
#pragma warning restore 612, 618 public static string ToJson(this ITypedElement source, FhirJsonSerializationSettings settings = null) => SerializationUtil.WriteJsonToString(writer => source.WriteTo(writer, settings), settings?.Pretty ?? false);