# bare-config
Type-safe configuration CRUD with a unified API across JSON, YAML, TOML, and Properties.
## Design Goal
- Parse once at boundaries.
- Operate on typed values (`Value`) through a consistent interface (`ConfigContent`).
- Avoid introducing a separate runtime validation framework in core.
## Features
- Unified `ConfigContent` trait for `select/insert/update/delete/upsert`
- Unified key path model (`Key`, `KeySegment`)
- Unified value model (`Value`)
- Format modules behind feature gates: `json`, `yaml`, `toml`, `properties`
## Quick Start
```rust
use bare_config::json::JsonContent;
use bare_config::{ConfigContent, Key, Value};
use std::str::FromStr;
let mut cfg = JsonContent::from_str(r#"{"server":{"port":8080}}"#)?;
let port = cfg.select(&Key::from_str(".server.port")?)?;
assert_eq!(port.as_integer(), Some(8080));
cfg.upsert(&Key::from_str(".server.host")?, &Value::string("127.0.0.1"))?;
println!("{}", cfg);
# Ok::<(), Box<dyn std::error::Error>>(())
```
## License
Licensed under either:
- Apache-2.0 ([LICENSE-APACHE](LICENSE-APACHE))
- MIT ([LICENSE-MIT](LICENSE-MIT))