Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Argon/Serialization/DefaultContractResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public class DefaultContractResolver : IContractResolver
/// </summary>
public NamingStrategy? NamingStrategy { get; set; }

// read-only: these built-in converters are read (unsynchronized) during contract creation on
// arbitrary threads, so the collection must not be publicly mutable. Backed by an array so the
// internal GetMatchingConverter (which takes IList) can still consume it without a copy.
static readonly JsonConverter[] builtInConverters =
// these built-in converters are read (unsynchronized) during contract creation on arbitrary
// threads. Exposed as a List for binary compatibility; the internal GetMatchingConverter (which
// takes IList) consumes it directly without a copy.
static readonly List<JsonConverter> builtInConverters =
[
new StringBuilderConverter(),
new ExpandoObjectConverter(),
Expand All @@ -45,7 +45,7 @@ public class DefaultContractResolver : IContractResolver
new StringWriterConverter()
];

public static IReadOnlyList<JsonConverter> Converters => builtInConverters;
public static List<JsonConverter> Converters => builtInConverters;

/// <summary>
/// Initializes a new instance of the <see cref="DefaultContractResolver" /> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<NoWarn>CS1591;CS1573;NU1605;NU1608;NU1109</NoWarn>
<LangVersion>preview</LangVersion>
<Version>0.35.1</Version>
<Version>0.35.2</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<Copyright>Copyright © James Newton-King 2008, Copyright © Simon Cropp 2022</Copyright>
<PackageTags>Json</PackageTags>
Expand Down
Loading