fix(genapi): uint64 fields failing to be unmarshalled (#2492)

uint64 fields get marshalled into json by protobuf as strings, so we
have to tell the json parser to look for strings when unmarshalling.
This commit is contained in:
Hugo authored and GitHub committed 2022-09-26 15:27:28 +01:00
1 parent 6116dad2bc
commit 902ca3cccb
3 files changed
+15 -3

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@ type Connection struct {
ClientTcpPort uint32 `json:"client_tcp_port,omitempty"`
EndpointTcpAddress string `json:"endpoint_tcp_address,omitempty"`
EndpointTcpPort uint32 `json:"endpoint_tcp_port,omitempty"`
BytesUp uint64 `json:"bytes_up,omitempty"`
BytesDown uint64 `json:"bytes_down,omitempty"`
BytesUp uint64 `json:"bytes_up,string,omitempty"`
BytesDown uint64 `json:"bytes_down,string,omitempty"`
ClosedReason string `json:"closed_reason,omitempty"`
}