config-parser icon indicating copy to clipboard operation
config-parser copied to clipboard

Allow dictionary/hashset-like sections

Open Krakean opened this issue 5 years ago • 1 comments

For example:

[Server]
Name = 192.168.0.1
[Server.Alpha]
Name = 192.168.0.2
IsAlpha = true
[Server.Beta]
Name = 192.168.0.3
IsBeta = true

If describe it as json, it would look something like this:

{
   "Server" : [
        {
             "Name" : "192.168.0.1",
             "Alpha": {
                    "Name" : "192.168.0.2",
                     "IsAlpha" : true
             },
             "Beta": {
                 "Name" : "192.168.0.3",
                "IsBeta" : "true",
             }
       }
   ]
}

Krakean avatar Jun 03 '19 18:06 Krakean

Are they not allowed right now? I'm quite sure you can create ini files like that. What do you want config parser to do? Transform it into an object or a raw JSON string? Please clarify your request.

salaros avatar Jun 07 '19 16:06 salaros