-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base POCO parsers/serializers on POCO, not IROD #2950
base: develop-6.0
Are you sure you want to change the base?
Conversation
…0/parse-elements-for-xml-parsers
# Conflicts: # src/Hl7.Fhir.Base/CompatibilitySuppressions.xml
# Conflicts: # src/Hl7.Fhir.Base/CompatibilitySuppressions.xml # src/Hl7.Fhir.Base/Serialization/BaseFhirJsonPocoSerializer.cs # src/Hl7.Fhir.Base/Serialization/FhirJsonConverter.cs
@@ -84,8 +88,11 @@ public static async Task<string> ToXmlAsync(this ITypedElement source, FhirXmlSe | |||
return await SerializationUtil.WriteXmlToStringAsync(async writer => await source.WriteToAsync(writer, settings).ConfigureAwait(false), settings?.Pretty ?? false, | |||
settings?.AppendNewLine ?? false).ConfigureAwait(false); | |||
|
|||
var engine = FhirSerializationEngineFactory.Strict(ModelInspector.ForType(b.GetType())); | |||
return ((PocoSerializationEngine)engine).SerializeToXml(b); | |||
// Note that this code is temporary, as we the above code will be re-instated here. It's therefore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it is temporary, maybe we should mark it with [TemporarilyChanged]?
return SerializationUtil.WriteXmlToString(source, (s,w) => s.WriteTo(w, settings), | ||
settings?.Pretty ?? false, settings?.AppendNewLine ?? false); | ||
|
||
// Note that this code is temporary, as we the above code will be re-instated here. It's therefore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it is temporary, maybe we should mark it with [TemporarilyChanged]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I accidentally set the review to "comment" instead of "request changes", this should tag it appropriately
DeserializeReaderToJson
has becomeDeserializeFromJsonReader
).Fixes #2917.