Updated ucimap example?

i am going over the ucimap_example.c ..from 15years ago. the code compiles and runs fine, and does what its supposed to for the most part. The issue is when you commit the changes, the updated entries aliases are added as individual list .. which it seems is the intention as when accessing the resulting uci package via uci get and uci show the results are correct ..or as intended

network.lan.aliases='a' 'b'

however uci export shows the issue

list 'aliases' 'a'
list 'aliases' 'b'

here is the relevant part of the code ..

if (set && !strcmp(net->name, "lan")) {
			ucimap_free_item(&net->map, &net->ipaddr);
			ucimap_set_changed(&net->map, &net->ipaddr);
			ucimap_resize_list(&net->map, &net->aliases, n_aliases);
			net->aliases->n_items = 0;
			list_for_each_entry(alias, &net->alias, list) {
				net->aliases->item[net->aliases->n_items++].ptr = alias;
			ucimap_set_changed(&net->map, &net->aliases);
			ucimap_store_section(&network_map, pkg, &net->map);
			uci_save(ctx, pkg);

my questions are

  1. are ucimaps still relevant ..or is there a way to parse uci configs from with in the ubus/ubox c api ?

  2. can the example be corrected to append the list instead of adding each list entry as a seperate list ?

  3. has uci/list.h been moved/merged? its not it the lasted sources, it is required to compile the example, but not to execute it

link to the ucimap_example.c