Converting a Protocol Buffer to a POJO -


is there tool or library can map protobuff object pojo. have pojo implement other interfaces can not protobuff object. or have manually conversion?

maybe late, can try protobuf-converter library. easy use.

convert pojo object related protobuf message:

pojoclass pojoinstance = new pojoclass(); ... protobufclass protoinstance = converter.create().toprotobuf(protobufclass.class, pojoinstance ); 

code backward conversion:

pojoclass pojoinstance = converter.create().todomain(pojoclass.class, protoinstance); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -