Switch to using serde_json::Value
internally over serde_yaml::Value
#507
Labels
serde_json::Value
internally over serde_yaml::Value
#507
Is your feature request related to a problem? Please describe.
Currently we're using
serde_yaml::Value
internally in a few places (such asconfig::Filter
). While seemingly very similar toserde_yaml::Value
, it's distinct in a few key ways that simplify a lot of stuff that we do. For example; When testing configuration we can then use theserde_json::json!
macro for generic objects, rather than needing to write YAML strings. The second reason of which is that YAML technically allows any kind of value to act as a key for a map (including things like arrays or even another map), this makes our conversion code to protobuf more complicated than it should be, as we are only expecting keys to be strings in everything we use.Describe the solution you'd like
Use
serde_json::Value
rather thanserde_yaml::Value
internally, and only encoding/decoding YAML at the presentation boundary. This let's us accept nice configuration in YAML, while having the maximum stability and flexibility of JSON.The text was updated successfully, but these errors were encountered: