HOCON.rs
Parse HOCON configuration files in Rust
The API docs for the master branch are published here.
Usage
let s = r#"{"a":5}"#;
let doc: Hocon = from_str.unwrap;
assert_eq!;
let s = r#"{"b":5, "b":10}"#;
let doc: Hocon = from_str.unwrap;
assert_eq!;
Serde support is enabled by default and can be used to deserialize HOCON documents to struct
s. It can be disabled by disabling default features.
use Deserialize;
let s = r#"{host: 127.0.0.1, port: 80, auto_connect: false}"#;
let conf: Configuration = from_str.unwrap;
Status
https://github.com/lightbend/config/blob/master/HOCON.md
- parsing JSON
- comments
- omit root braces
- key-value separator
- commas are optional if newline is present
- whitespace
- duplicate keys and object merging
- unquoted strings
- multi-line strings
- value concatenation
- object concatenation
- array concatenation
- path expressions
- path as keys
- substitutions
- includes
- conversion of numerically-indexed objects to arrays
- allow URL for included files
- duration unit format
- period unit format
- size unit format