SafetyCulture / grpc-web-devtools

Chrome & Firefox Browser extension to aid gRPC-Web development
MIT License
402 stars 51 forks source link

Emit default values when converting message to JSON for display #176

Open will-osborne opened 4 months ago

will-osborne commented 4 months ago

Summary

This change enables visibility of default values in the request and response objects. E.g empty strings and false booleans. what would have show as this before

{
  "foo": "bar"
}

Looks like this after

{
  "foo": "bar",
  "baz": "",
  importantBoolean: false
}

Problem description

Not displaying defalt values is misleading and is against the idioms of GRPC.

Pros/cons of approach implemented

Pros: It's simple and uses existing functionality. Cons: It's non-configurable.

Checklist


Code Review Guidelines for Reviewers