4

I'm looking for Java implementation of Protocol Buffer using annotation the same way it is implemented in protobuf-net project. I just want the easy of use of annotation without the need to constantly compile the .proto file using protoc.

3
  • 2
    Hmmm... If only I knew java as well as I know .net :p Commented Oct 8, 2011 at 15:05
  • Do you mean looking at the code of protobuf-net and translate it to Java? Commented Oct 9, 2011 at 21:46
  • 2
    I mean I'm the author of protobuf-net, and it would be an interesting challenge to port it; unfortunately my java knowledge is fairly minimal. Commented Oct 10, 2011 at 9:54

2 Answers 2

7

The Protostuff library can serialize annotated POJOs: https://protostuff.github.io/docs/protostuff-runtime/

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, that looks good. I'll try to use it inside Jersey container
-1

Aside from great Protostuff library that is already mentioned, perhaps you might also consider trying out JSON instead -- unless you absolutely must use protobuf due to compatibility reasons. JSON processing on Java is not only very convenient (annotation-based, auto-detection), it is also competitive in performance (see jvm-serializers results, for example).

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.