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

Duplicate Sections #215

Open
chasewallis opened this issue May 28, 2020 · 2 comments
Open

Duplicate Sections #215

chasewallis opened this issue May 28, 2020 · 2 comments

Comments

@chasewallis
Copy link

chasewallis commented May 28, 2020

I have to read an ini file in this format:

[Peer]
PeerInformation = important-info-here

[Peer]
PeerInformation = more-important-info

Attempting to parse with AllowDuplicateSections and AllowDuplicateKeys just merges the information into 1 section. I didn't see any other option that would allow both sections to exist. Looking into the code, the sections are stored in a dictionary with the section name as the key. I'm not seeing a way to easily make this happen.

Is this enhancement something that this project would want or is this ini format not expected and will never be supported?

@yuusakuri
Copy link

yuusakuri commented Sep 21, 2021

I have created a .NET library that solves this problem. I'm glad if you use it.

https://github.com/yuusakuri/Ini

@stamler
Copy link

stamler commented Nov 18, 2022

@chasewallis This is exactly what I'm trying to do, for wireguard configs. Unfortunately same issue. I think I'll just build my own serializer.

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

3 participants