-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Assume we have toml text below:
field = 1
__unknown_field_1 = "__unknown_field_value"
Assume we have related class:
class Member
{
[DataMember(Name = "field")]
public int Field { get; set; }
[JsonIgnore]
public Dictionary<string, object> UnknownFields { get; set; }
}
If there exists any fields what is not exist in the class member, then it will put into UnknownFields
. The expected: (I will use json to represent it.)
{
"field": 1,
"unknown_fields": {
"__unknown_fields_1": "__unknown_field_value"
}
}
Is there any way to do it? Or in other words, is Tomlyn provides somthing like [JsonExtensionData]
?
The similar feature can reference from serde-rs, which can see here: serde-rs/serde#941
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested