Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement FieldMask Well-Known type #497

Closed
alexeyten opened this issue Feb 1, 2022 · 1 comment
Closed

Implement FieldMask Well-Known type #497

alexeyten opened this issue Feb 1, 2022 · 1 comment

Comments

@alexeyten
Copy link
Contributor

https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask

This should serialize to JSON as a comma-separated string.
And probably in JS this should be represented as an array of string. E.g. this

syntax = "proto3";

package dummy;

import "google/protobuf/field_mask.proto";

message GetFields {
  uint32 id = 1;
  google.protobuf.FieldMask fields = 2;
}

should be represented as an object { id: 1, fields: ['foo', 'bar', 'baz.quux'] }.
Now it is represented as { id: 1, fields: { paths: ['foo', 'bar', 'baz.quux'] }.

@stephenh
Copy link
Owner

Closing this out thanks to @buyology 's PR; thanks Robin!

(@alexeyten fwiw I'm open to a follow up issue to represent FieldMask as a string[] directly in the message as well; currently it's a string[] in the JSON, but still a FieldMask message type.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants