0

question:

I want to convert proto deserialized Builder into java Constructor, which needs to deal with the wrappers class. When it encounters no assignment, it changes to NULL.

eg: proto

syntax = "proto3";

import "google/protobuf/wrappers.proto";
option java_outer_classname = "PeopleProto";

message People {
int32 personId = 1;
string personName = 2;
google.protobuf.StringValue sex = 3;
repeated string address = 4;
}

java

public class People {

private int personId;

private String personName;

private String sex;

List<String> address;

...
}

I have tried two ways:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.