I am wondering if it is possible to collect all the extra fields within a Toml table, that were not processed into other fields/properties, into an Dictionary on the object. Something like this:
[TomlSerializedObject(NamingConvention = TomlNamingConvention.SnakeCase)]
public partial class Character
{
[TomlValueOnSerialized] public required string Name { get; set; }
[TomlValueOnSerialized] public required string Model { get; set; }
[TomlExtraFields] public required Dictionary<string, TomlValue> ExtraData { get; set; }
}
[[Character]]
name = "Test Character"
model = "models/characters/basic_skeleton.fbx"
cool_str = "A very cool string"
cool_number = 123
In this example, it would example ExtraData would end up with two values, cool_str and cool_number. Is this or anything like this possible?
I am wondering if it is possible to collect all the extra fields within a Toml table, that were not processed into other fields/properties, into an Dictionary on the object. Something like this:
In this example, it would example ExtraData would end up with two values, cool_str and cool_number. Is this or anything like this possible?