gRPC: Timestamp and Duration types (google.protobuf) should be represented in string in JSON.
Is there an existing issue for this?
- [X] I have searched the tracker for existing similar issues and I know that duplicates will be closed
Describe the Issue
According to the official documentation and various well-known protobuf libraries, JSON representations of google.protobuf.Timestamp and google.protobuf.Duration are "string":
- https://protobuf.dev/reference/protobuf/google.protobuf/
- https://protobuf.dev/reference/java/api-docs/com/google/protobuf/Timestamp
- https://protobuf.dev/reference/java/api-docs/com/google/protobuf/Duration
Postman, on the other hand, treats them as a JSON object.
Steps To Reproduce
Try invoking any gPRC method that accepts or returns Timestamp or Duration types. Postman expects {"seconds": 1, "nanos": 0} but complains on "1s" for Duration fields.
Screenshots or Videos
No response
Operating System
macOS
Postman Version
10.22.9
Postman Platform
Postman App
User Account Type
Signed Out User
Additional Context?
No response
Hey @zzJinux !
Thanks for reporting the issue. This seems to be stemming from an underlying package we use. We'll take a look at this and share more details soon.
Hi, are there any updates regarding this?
@TilGP Let's thumb up!
Thanks for reporting this!
This issue has been fixed in Postman v11.67.0. 🎉 Postman now correctly follows the canonical JSON representations for Google's well-known types — Struct, Duration, and Timestamp — in both request payloads and responses.
This update brings Postman in line with the official protoJSON specification.
Please update to the latest version to get the fix, and feel free to reopen this issue if you continue to experience any problems.