peterbourgon / ff

Flags-first package for configuration
Apache License 2.0
1.34k stars 59 forks source link

Nested Config #107

Closed lmittmann closed 12 months ago

lmittmann commented 1 year ago

Would you be open to a PR that enables nesting inside JSON configurations? This would allow flags containing dots to be looked up at the corresponding path. E.g. the flag a.b could be configured inside {"a": {"b":"xxx"}}.

peterbourgon commented 1 year ago

Probably not.

lmittmann commented 1 year ago

This is possible with fftoml, why not allow it for json and yml?

peterbourgon commented 1 year ago

I think it may have been a mistake to allow it in fftoml.

But, upon reflection, I suspect my initial reaction may be too conservative, and there may be actual value in this feature.

I'm open to reviewing a change that allows nesting of configuration in this way, provided the API and behavior is consistent across ffyaml, fftoml, and ffjson.

jolheiser commented 12 months ago

This can be closed per #112

Thanks again to both of you!