message Config { repeated Server server = 1; } message Server { string address = 1; int32 port = 2; bool standby = 3; }
# main instance server { address: "127.0.0.1" port: 4567 } # backup instance server { address: "127.0.0.1" port: 9876 standby: true }
Config config; google::protobuf::TextFormat::ParseFromString(input, &config);
It looks oddly like HCL. I wonder...