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

Support struct yaml #330

Merged
merged 3 commits into from
Jun 19, 2023
Merged

Support struct yaml #330

merged 3 commits into from
Jun 19, 2023

Conversation

qicosmos
Copy link
Collaborator

Why

Add struct_yaml:

// serialization the structure to the string
person p = {"admin", 20};
std::string ss;  // here use std::string is also ok
struct_yaml::to_yaml(ss, p);
std::cout << ss << std::endl;
std::string yaml = R"(
name : tom
age : 30
)";
// deserialization the structure from the string
struct_yaml::from_yaml(p, yaml);

@qicosmos qicosmos merged commit a0e07ed into alibaba:main Jun 19, 2023
@qicosmos qicosmos deleted the support_struct_yaml branch June 19, 2023 07:27
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

Successfully merging this pull request may close these issues.

1 participant