Add basic support for maps

This commit is contained in:
Daniel G. Taylor
2019-10-10 22:20:27 -07:00
parent ad7162a3ec
commit e0d1611797
7 changed files with 116 additions and 36 deletions

View File

@@ -48,7 +48,7 @@ if __name__ == "__main__":
json_files = get_files(".json")
for filename in proto_files:
print(f"Generatinng code for {os.path.basename(filename)}")
print(f"Generating code for {os.path.basename(filename)}")
subprocess.run(
f"protoc --python_out=. {os.path.basename(filename)}", shell=True
)

View File

@@ -0,0 +1,7 @@
{
"counts": {
"item1": 1,
"item2": 2,
"item3": 3
}
}

View File

@@ -0,0 +1,5 @@
syntax = "proto3";
message Test {
map<string, int32> counts = 1;
}