list of tags in key/value pairs

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

list of tags in key/value pairs

Nicholas Satterly

I'm trying to use libConfuse to initialise a list of tags like so...

section {
    tags = { tag1 = abc, tag2 = xyz }

The best I've managed to do so far is use a list of strings and then strtok() each one on the equals sign...

section {
  tags = { "tag1 = abc", "tag2 = xyz" }

But surrounding the key/value pairs with double quotes is ugly and (human) error prone. A possible option might be something like this...

section {
  tags {
    tag1 = abc
    tag2 = xyz

Another option could be to use callbacks however I don't completely understand how they work with libConfuse.

Any help would be greatly appreciated.


Confuse-devel mailing list
[hidden email]