Thread overview
Preferred program config file format and parsing library?
Aug 02, 2014
Gary Willoughby
Aug 02, 2014
Stefan Koch
Aug 03, 2014
Marc Schütz
Aug 03, 2014
Gary Willoughby
Aug 03, 2014
John Colvin
Aug 03, 2014
Gary Willoughby
Aug 05, 2014
Baz
Aug 05, 2014
Baz
August 02, 2014
What is the preferred format people here use for program config files? Json, Xml, ini, etc?

Also what libraries exist to parse the preferred format?
August 02, 2014
On Saturday, 2 August 2014 at 12:42:00 UTC, Gary Willoughby wrote:
> What is the preferred format people here use for program config files? Json, Xml, ini, etc?
>
> Also what libraries exist to parse the preferred format?

for me json is nice because it is  virtually everywhere.
for most casese std.json is enough but I use vibe.d for serialisation
August 03, 2014
On Saturday, 2 August 2014 at 12:42:00 UTC, Gary Willoughby wrote:
> What is the preferred format people here use for program config files? Json, Xml, ini, etc?

JSON is nice for data exchange, but I dislike it for configuration. It doesn't even support comments, or disabling sections of the file. YML is friendlier in this regard.

DUB is considering switching from JSON to SDL:

http://sdl.ikayzo.org/display/SDL/Home
http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/2/
August 03, 2014
On Sunday, 3 August 2014 at 09:31:20 UTC, Marc Schütz wrote:
> On Saturday, 2 August 2014 at 12:42:00 UTC, Gary Willoughby wrote:
>> What is the preferred format people here use for program config files? Json, Xml, ini, etc?
>
> JSON is nice for data exchange, but I dislike it for configuration. It doesn't even support comments, or disabling sections of the file. YML is friendlier in this regard.
>
> DUB is considering switching from JSON to SDL:
>
> http://sdl.ikayzo.org/display/SDL/Home
> http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/2/

Interesting, are there D libs available to parse yaml and sdl?
August 03, 2014
On Sunday, 3 August 2014 at 10:54:10 UTC, Gary Willoughby wrote:
> On Sunday, 3 August 2014 at 09:31:20 UTC, Marc Schütz wrote:
>> On Saturday, 2 August 2014 at 12:42:00 UTC, Gary Willoughby wrote:
>>> What is the preferred format people here use for program config files? Json, Xml, ini, etc?
>>
>> JSON is nice for data exchange, but I dislike it for configuration. It doesn't even support comments, or disabling sections of the file. YML is friendlier in this regard.
>>
>> DUB is considering switching from JSON to SDL:
>>
>> http://sdl.ikayzo.org/display/SDL/Home
>> http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/2/
>
> Interesting, are there D libs available to parse yaml and sdl?

http://code.dlang.org/packages/dyaml
August 03, 2014
On Sunday, 3 August 2014 at 11:38:47 UTC, John Colvin wrote:
> On Sunday, 3 August 2014 at 10:54:10 UTC, Gary Willoughby wrote:
>> On Sunday, 3 August 2014 at 09:31:20 UTC, Marc Schütz wrote:
>>> On Saturday, 2 August 2014 at 12:42:00 UTC, Gary Willoughby wrote:
>>>> What is the preferred format people here use for program config files? Json, Xml, ini, etc?
>>>
>>> JSON is nice for data exchange, but I dislike it for configuration. It doesn't even support comments, or disabling sections of the file. YML is friendlier in this regard.
>>>
>>> DUB is considering switching from JSON to SDL:
>>>
>>> http://sdl.ikayzo.org/display/SDL/Home
>>> http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/2/
>>
>> Interesting, are there D libs available to parse yaml and sdl?
>
> http://code.dlang.org/packages/dyaml

Great, ta.
August 05, 2014
On Saturday, 2 August 2014 at 12:42:00 UTC, Gary Willoughby wrote:
> What is the preferred format people here use for program config files? Json, Xml, ini, etc?
>
> Also what libraries exist to parse the preferred format?

Preffered one is the one a RTL(run time library) or a VCL(visual component library) uses.
I hate those using markups, like xml. ugly, hard to edit eg in notepad.
I hate ini. ini is kind of a beginner format. ini is ridiculous.

A good config file format has to
- be editable.
- be strongly used in the lang. standard library: the one used cause it's good.
- not ini. ini files = child happy to discover he can save and load settings.
- convertible: even if it's a proprietary format it must be convertible to json or xml or yaml (or ini for the children). https://en.wikipedia.org/wiki/Marshalling_(computer_science).

August 05, 2014
> https://en.wikipedia.org/wiki/Marshalling_(computer_science) bla.
damn it.