Skip to content

Custom option not parsed correctly when using TextFormat #636

@subk

Description

@subk

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' }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions