You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It throws a System.NotSupportedException with the following message:
Deserialization of types without a parameterless constructor, a singular parameterized constructor, or a parameterized constructor annotated with JsonConstructorAttribute is not supported. Type OrchardCore.Commerce.AddressDataType.Region.
To Reproduce
Easiest way to reproduce is:
using OrchardCore.Commerce.AddressDataType;using System.Text.Json;varjson= JsonSerializer.Serialize(Regions.All);varregions= JsonSerializer.Deserialize<IEnumerable<Region>>(json);// throws
github-actionsbot
changed the title
Serializing the Region type using System.Text.Json throws an exception.
Serializing the Region type using System.Text.Json throws an exception. (OCC-302)
Oct 8, 2024
Describe the bug
It throws a
System.NotSupportedException
with the following message:Deserialization of types without a parameterless constructor, a singular parameterized constructor, or a parameterized constructor annotated with
JsonConstructorAttribute
is not supported. TypeOrchardCore.Commerce.AddressDataType.Region
.To Reproduce
Easiest way to reproduce is:
Expected behavior
Should not throw.
Jira issue
The text was updated successfully, but these errors were encountered: