Fix from_dict() in the presence of optional datetime fields. (#329)

This commit is contained in:
Eitan Mosenkis
2022-02-03 11:00:56 +02:00
committed by GitHub
parent eeddc844a5
commit 8c727d904f
4 changed files with 9 additions and 5 deletions

View File

@@ -8,5 +8,6 @@
},
"test6": "B",
"test7": "8589934592",
"test8": 2.5
"test8": 2.5,
"test9": "2022-01-24T12:12:42Z"
}

View File

@@ -1,5 +1,7 @@
syntax = "proto3";
import "google/protobuf/timestamp.proto";
message InnerTest {
string test = 1;
}
@@ -13,6 +15,7 @@ message Test {
optional TestEnum test6 = 6;
optional uint64 test7 = 7;
optional float test8 = 8;
optional google.protobuf.Timestamp test9 = 9;
}
enum TestEnum {

View File

@@ -35,4 +35,5 @@ def test_null_fields_json():
"test6": None,
"test7": None,
"test8": None,
"test9": None,
}