Skip to content

Commit

Permalink
Merge pull request #2828 from FirelyTeam/2818-fhirjsonconverter-break…
Browse files Browse the repository at this point in the history
…ing-change-in-580

Added back missing FhirJsonConverter
  • Loading branch information
ewoutkramer authored Jul 30, 2024
2 parents 618c9de + 5e4292a commit 489034a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Hl7.Fhir.Base/Serialization/FhirJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ internal void SetMode(DeserializerModes mode)
public class FhirJsonConverter<F> : JsonConverter<F>
where F : Base
{
// internal for testing purposes
private readonly PocoSerializationEngine _engine;

private FhirJsonConverter(IFhirSerializationEngine engine)
Expand All @@ -100,6 +99,12 @@ public FhirJsonConverter(
// nothing
}

[Obsolete("Using this directly is not recommended. Instead, try creating a converter using the .ForFhir static method of the JsonSerializerOptions class")]
public FhirJsonConverter(
Assembly assembly, FhirJsonPocoSerializerSettings? serializerSettings = null, FhirJsonPocoDeserializerSettings? deserializerSettings = null,
Predicate<CodedException>? ignoreFilter = null) :
this(FhirSerializationEngineFactory.Custom(ModelInspector.ForAssembly(assembly), ignoreFilter ?? (_ => false), deserializerSettings, serializerSettings)){}

/// <summary>
/// Constructs a <see cref="JsonConverter{T}"/> that (de)serializes FHIR json for the
/// POCOs in a given assembly.
Expand Down

0 comments on commit 489034a

Please sign in to comment.