qicosmos/iguana

[feat]support map

qicosmos opened this issue · 0 comments

support map field:

struct my_struct {
  std::map<std::string, int> map;
};

after to_xml:

my_struct t{{"a", 1}, {"b", 2}};
std::string xml;
iguana::to_xml(t, xml);

<?xml version='1.0' encoding='UTF-8'?>
<my_struct>
  <map>
    <entry key="a">1</entry>
    <entry key="b">2</entry>
  </map>
</my_struct>