- name => '',
- notes => '',
- tags => '',
- icon_id => sub { defined $_[1] ? icon($_[1]) : ICON_FOLDER },
- custom_icon_uuid => undef,
- is_expanded => false,
- default_auto_type_sequence => '',
- enable_auto_type => undef,
- enable_searching => undef,
- last_top_visible_entry => undef,
- # custom_data => sub { +{} },
- previous_parent_group => undef,
- # entries => sub { +[] },
- # groups => sub { +[] },
+ name => ['', coerce => \&to_string],
+ notes => ['', coerce => \&to_string],
+ tags => ['', coerce => \&to_string],
+ # icon_id => sub { defined $_[1] ? icon($_[1]) : ICON_FOLDER },
+ custom_icon_uuid => [undef, coerce => \&to_uuid],
+ is_expanded => [false, coerce => \&to_bool],
+ default_auto_type_sequence => ['', coerce => \&to_string],
+ enable_auto_type => [undef, coerce => \&to_tristate],
+ enable_searching => [undef, coerce => \&to_tristate],
+ last_top_visible_entry => [undef, coerce => \&to_uuid],
+ # custom_data => {},
+ previous_parent_group => [undef, coerce => \&to_uuid],
+ # entries => [],
+ # groups => [],
+ times => [{}],