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

Custom option not parsed correctly when using TextFormat #636

Closed
subk opened this issue Jan 10, 2017 · 1 comment
Closed

Custom option not parsed correctly when using TextFormat #636

subk opened this issue Jan 10, 2017 · 1 comment
Labels

Comments

@subk
Copy link
Contributor

subk commented Jan 10, 2017

protobuf.js version: 6.4.5

Custom option are not correctly parsed when using TextFormat definition

Given this proto :

syntax = "proto3";
package test;
import "google/protobuf/descriptor.proto";

message MyOptions {
  string a = 1;
  string b = 2;
}

extend google.protobuf.FieldOptions {
  MyOptions my_options = 50000;
}

message Test {
  string value = 1 [(my_options) = { a: "foo" b: "bar" }];
}

Will result in :

{ '(my_options).a': 'foo', '(my_options).a.b': 'bar' }

Expected :

{ '(my_options).a': 'foo', '(my_options).b': 'bar' }
@dcodeIO dcodeIO added the bug label Jan 10, 2017
@subk
Copy link
Contributor Author

subk commented Jan 10, 2017

As a workaround, protobuf syntax perfectly works :

message Test {
  string value = 1 [(my_options).a = "foo", (my_options).b = "bar"];
}

Result :

{ '(my_options).a': 'foo', '(my_options).b': 'bar' }

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

No branches or pull requests

2 participants