1

I have an immutable object of class

class A {
   public A(B b) {
       this.a = b.c;
   }

   @Tag(1)
   final int a;
}

How to add field into class with backward binary deserialization compatibility using Protostuff without writing custom deserializers if it possible?

Ibes
  • 21
  • 2

1 Answers1

0

Always append new fields in your class rather than insert them in the middle of the fields.

refer to official document

starwarswii
  • 2,187
  • 1
  • 16
  • 19
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 10 '23 at 02:10