Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]support map #311

Open
qicosmos opened this issue Sep 24, 2024 · 0 comments
Open

[feat]support map #311

qicosmos opened this issue Sep 24, 2024 · 0 comments

Comments

@qicosmos
Copy link
Owner

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant