< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] rutil::ConfigParse question



On 20/03/15 19:18, Scott Godin wrote:
> Originally ConfigParse was setup to allow multiple values for a
> configuration option.  However in December of 2013 Daniel P. added the
> duplicated key detection - breraking this capability.  I'm not sure the
> reason why - so I'll let him chime in on this.  His commit comment was:
> * rutil: ConfigParse: reject duplicate values from any given config source
> 
> In the meantime, it seems (after code inspection) that if you use a
> comma separated string for the value - that you can get multiple items
> returned.  
> 

The reason I added the duplicate key detection is that it was otherwise
possible for people to make mistakes where they repeat the same
parameter with different values at different places in the config file.

Now that we have cajun as a dependency, we could consider using JSON for
the configuration file.  That would allow arrays to be explicitly
declared in square brackets.  It would also simplify the code for
parsing transports in the advanced config format.