
I have an interesting idea how to preserve comments & layout information. The relevant structures should be included in the tree under a special meta key: Config file: key1 data1 ;comment before key2 key2 data2 ;comment after key2, on the same line The resulting tree might look like that: key1 data1 key2 data2 _metadata_ { key1 { row 1 column 1 } comment "comment before key2" { row 2 column 1 } key2 { row 3 column 1 } comment "comment after key2, on the same line" { row 3 column 15 } } This way it is easily accessible using ptree interface, it is readable, editable, and it is possible to manipulate it programatically. And above all, it does not require any extra support from ptree, only from the parsers. With some effort it also allows 100% reproduction of original layout. --Marcin