Skip to content

Re-thinking: Support deserializing key-value config data #322

@matthiasbeyer

Description

@matthiasbeyer

config-rs should be able to support key-value configuration data of the following types:

  • Bool
  • Integer
  • Float
  • String
  • List of "value"
  • Key-Value Mapping of "String" to "Value"

Something like

#[derive(serde::Deserialize)]
enum Value {
    Bool(bool),
    Int(i64),
    Float(f64),
    Text(String),
    List(Vec<Value>),
    Map(HashMap<String, Value>),
}

Should be the basis of all operations. This data format can be deserialized from different sources and be used for the "layering" functionality later.
It might be even possible to implement in a non-owning way.

We should keep the currently supported formats as supported formats in the future.

That entails:

  • Toml
  • Json
  • INI
  • Yaml
  • Ron
  • Json5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions