we cannot limit the `--networkid` switch to values available in `PublicNetwork` enum. it should able to accept very wide range of custom NetworkId.
instead of using stdlib/json, now we switch to json_serialization the result is much tidier code and more robust when parsing optional fields. fixes #635