L Jun,

I did not change the proto format. Continuing to use proto2 :|

--rc

On Mon, Mar 9, 2020 at 1:53 AM L Jun <[email protected]> wrote:

> Hi, did you solve it ?  how?
>
>
> On Tuesday, June 6, 2017 at 2:48:43 AM UTC+8, R.C. wrote:
>>
>> Hi,
>>
>> I am looking to move an application written with proto2 to use proto3. I
>> understand 'extensions' is disabled in proto3 and am looking for some
>> guidance to change the below to proto3:
>>
>>
>> ========================
>> common.proto:
>>
>> message Vehicles {
>>     extensions 1 to max
>> }
>>
>> ========================
>> car.proto:
>>
>> import "common.proto";
>>
>> message Car {
>>     string type = 1;
>>     string color = 2;
>> }
>>
>> extend Vehicles {
>>     optional Car CarExt  = 100;
>> }
>>
>> ========================
>>
>> bike.proto:
>>
>> import "common.proto";
>>
>> message Bike {
>>     string type = 1;
>>     string color = 2;
>> }
>>
>> extend Vehicles {
>>     optional Bike BikeExt = 200;
>> }
>> ========================
>>
>> Since 'optional' is default i can remove the 'optional' keyword but I am
>> not sure how 'Any' can be used in such scenario in the place of
>> 'extensions'.
>>
>> Thanks,
>> rc
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Protocol Buffers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/protobuf/49chFOx06nU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/b0844c33-b51a-4bc5-9a4b-a7d40b33892a%40googlegroups.com
> <https://groups.google.com/d/msgid/protobuf/b0844c33-b51a-4bc5-9a4b-a7d40b33892a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
The Difference between Dreams and Accomplishment is Purely Desire

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CACvJTjxi7xWgxnGwQfFmJdwO6aMo%3DWzQgsEHqAnEisChWA-ETg%40mail.gmail.com.

Reply via email to