Skip to content

Commit 489034a

Browse files
authored
Merge pull request #2828 from FirelyTeam/2818-fhirjsonconverter-breaking-change-in-580
Added back missing FhirJsonConverter
2 parents 618c9de + 5e4292a commit 489034a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Hl7.Fhir.Base/Serialization/FhirJsonConverter.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ internal void SetMode(DeserializerModes mode)
8080
public class FhirJsonConverter<F> : JsonConverter<F>
8181
where F : Base
8282
{
83-
// internal for testing purposes
8483
private readonly PocoSerializationEngine _engine;
8584

8685
private FhirJsonConverter(IFhirSerializationEngine engine)
@@ -100,6 +99,12 @@ public FhirJsonConverter(
10099
// nothing
101100
}
102101

102+
[Obsolete("Using this directly is not recommended. Instead, try creating a converter using the .ForFhir static method of the JsonSerializerOptions class")]
103+
public FhirJsonConverter(
104+
Assembly assembly, FhirJsonPocoSerializerSettings? serializerSettings = null, FhirJsonPocoDeserializerSettings? deserializerSettings = null,
105+
Predicate<CodedException>? ignoreFilter = null) :
106+
this(FhirSerializationEngineFactory.Custom(ModelInspector.ForAssembly(assembly), ignoreFilter ?? (_ => false), deserializerSettings, serializerSettings)){}
107+
103108
/// <summary>
104109
/// Constructs a <see cref="JsonConverter{T}"/> that (de)serializes FHIR json for the
105110
/// POCOs in a given assembly.

0 commit comments

Comments
 (0)