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:
parent
7a08dd70cb
commit
aaab19509e
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue