singbox_config 0.17.0

A library for serializing and deserliazing sing-box config files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub mod macros;
pub mod def;


pub fn serialize(config: &def::Config, pretty: bool) -> Result<String, serde_json::Error> {
    if pretty {
        serde_json::to_string_pretty(config)
    }
    else {
        serde_json::to_string(config)
    }
}