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

Add conversion from Section to INI #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SebastienGllmt
Copy link
Contributor

I have a project that that a large INI where subsets of this configuration gets passed to smaller tasks downstream. My idea was to use this library to parse the large INI file, then downstream tasks can use serde-ini to parse the INI subset according to their specifications.

To achieve this, I added a function to sections where they can convert themselves to an INI file with only themselves as an entry. This newly generated subset of the INI file can then be passed to downstream services. Notably, this is simpler than re-implementing the write_to functions for Sections

In the end, I think with this more complicated setup it maybe better to just use TOML, but I'm sharing the code anyway since somebody else may find this useful.

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.

None yet

1 participant