www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Preferred program config file format and parsing library?

reply "Gary Willoughby" <dev nomad.so> writes:
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?
Aug 02 2014
next sibling parent "Stefan Koch" <uplink.coder gmail.com> writes:
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
Aug 02 2014
prev sibling next sibling parent reply "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> writes:
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/
Aug 03 2014
parent reply "Gary Willoughby" <dev nomad.so> writes:
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?
Aug 03 2014
parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
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
Aug 03 2014
parent "Gary Willoughby" <dev nomad.so> writes:
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.
Aug 03 2014
prev sibling parent reply "Baz" <Baz nowhere.utopia> writes:
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).
Aug 05 2014
parent "Baz" <Baz nowhere.utopia> writes:
 https://en.wikipedia.org/wiki/Marshalling_(computer_science) 
 bla.
damn it.
Aug 05 2014