You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 extend
Value::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.The text was updated successfully, but these errors were encountered: