Closed Codewolf closed 1 year ago
Timestamp
is not encoded as a message with seconds
and nanos
in JSON, instead it is encoded with RFC 3339:
Timestamp : string : "1972-01-01T10:00:20.021Z" : Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted.
Timestamp
is not encoded as a message withseconds
andnanos
in JSON, instead it is encoded with RFC 3339:Timestamp : string : "1972-01-01T10:00:20.021Z" : Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted.
huh, my bad, i was so focused on where it was erroring i completely failed to notice that. The marshaller i use must be putting out the incorrect format. Thanks @puellanivis
What version of protobuf and what language are you using? libprotoc 3.21.9 protoc-gen-go-grpc v1.3.0 go version go1.19.3 darwin/arm64
What did you do? Create a test Message containing only relevant data
Create a testing script to unmarshal the a json string into the protobuf.
What did you expect to see?
What did you see instead?
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment? I have referenced https://github.com/golang/protobuf/issues/1433 as well as reading https://developers.google.com/protocol-buffers/docs/gotutorial, otherwise the code above was written in a clean project made specifically for this error