fullstorydev / fullstorydev/grpcurl

Document "well known" protobuf types and their json mapping

Open
#121 4 comments 8 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
12.8k
Forks
580
Avg merge
1h 8m
Merged PRs (30d)
5

Description

I struggled to form the json payload for a gRPC service that used google's well-known [timestamp](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto) defintion. I assumed the json for it would be:

```json
{
"field_name": {
"seconds": 1500000000,
"nanos": 1000
}
}
```

Only by trial and error, did I figure out that `grpcurl` actually expects the timestamp to be an RFC string:

```json
{
"field_name": "2019-01-01T00:00:00Z"
}
```

I think this behavior (along with any other non-trivial mappings) should be documented on the README. I'm happy to make the PR for these additions, but I don't know where to find this mapping.

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.