I'd like to be able to focus on providers.1.config, merge/join other providers and then deserialize the contents into an arbitrary struct defined by the websearch plugin.
Petition
Currently, Value::find and, by proxy, Figment::focus work exclusively on dict keys, arrays are ignored.
If we extend Value::find and Value::find_ref to attempt to index arrays, arrays can be traversed and the contained dicts found/focused on.
I managed to hack support into it on my fork and it works perfectly for my use case.
Is this feature wanted in this project? If so, I'd be happy to update find_ref, docs, tests and submit a PR.
Use Case
Given a configuration file like this:
I'd like to be able to focus on
providers.1.config
, merge/join other providers and then deserialize the contents into an arbitrary struct defined by the websearch plugin.Petition
Currently,
Value::find
and, by proxy,Figment::focus
work exclusively on dict keys, arrays are ignored. If we extendValue::find
andValue::find_ref
to attempt to index arrays, arrays can be traversed and the contained dicts found/focused on.I managed to hack support into it on my fork and it works perfectly for my use case.
Is this feature wanted in this project? If so, I'd be happy to update
find_ref
, docs, tests and submit a PR.