area-System.Text.Jsonenhancementhelp wantedwishlist
仓库指标
- Star
- (17,886 star)
- PR 合并指标
- (平均合并 12天 11小时) (30 天内合并 661 个 PR)
描述
IMHO, IReadOnlyDictionary should work identical to IDictionary when using with JsonExtensionData attribute.
[JsonExtensionData]
public IReadOnlyDictionary<string, JsonElement> Payload { get; set; }
Currently it fails with error:
System.InvalidOperationException: The data extension property 'Payload' does not match the required signature of IDictionary<string, JsonElement> or IDictionary<string, object>.
This is analogous to collection properties which can be defined as List<T>, IList<T> or IReadOnlyList<T> etc.