chaokunyang opened a new issue, #2861:
URL: https://github.com/apache/fory/issues/2861

   ### Feature Request
   
   Support enum variant for compatible Mode, so when deserializing, the target 
enum can have different or missing enum variant, and the deserialization can 
still succeed.
   
   
   
   ### Is your feature request related to a problem? Please describe
   
   Serialization:
   
   ```rust
   enum Foo {
     #[default]
     A,
     B(i32, String)
   }
   
   let v1 = Foo::B(10, "abc".into())
   ```
   
   Deserialization:
   ```rust
   enum Foo {
      #[default]
     A,
   }
   let v1: Foo = fory.deserialize(&bytes).unwrap()
   ```
   
   
   
   The deserialization can still succeed, and return `Foo::A` instead and 
return Error if compatible mode is not enabled
   
   
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to