pub fn parse_json(cfg: &str) -> NetworkExpand description
Parse a json configuration into a network config
Check the config module for details. Following is a sample
configuration to get you started. Alternatively, you can also use
the config types directly.
{
"endpoints": [
{
"id": 0,
"type": "tcp",
"params": {
"addr": "0.0.0.0",
"port": 9000,
"peers": ["127.0.0.1:8080"],
"dynamic": false
}
},
{
"id": 1,
"type": "local-udp",
"params": { "addr": "0.0.0.0" }
}
],
"patches": {
"0": "external",
"1": "external"
}
}