Fix array type handling in ArgumentJsonConverter

Previously, the code incorrectly used `MakeCollectionType` for arrays. This has been corrected to use `MakeArrayType`, ensuring proper deserialization of array arguments.
This commit is contained in:
Sipke Schoorstra 2025-01-15 10:50:17 +01:00
parent 7a08dd70cb
commit aaab19509e

View file

@ -44,7 +44,7 @@ public class ArgumentJsonConverter : JsonConverter<ArgumentDefinition>
var type = _wellKnownTypeRegistry.GetTypeOrDefault(typeName);
if (isArray)
type = type.MakeCollectionType();
type = type.MakeArrayType();
var newOptions = new JsonSerializerOptions(options);
newOptions.Converters.RemoveWhere(x => x is ArgumentJsonConverterFactory);