chaokunyang commented on issue #1148:
URL: https://github.com/apache/fory/issues/1148#issuecomment-3752780753

   > For simpler serializer registration and an improved developer experience, 
it would be nice if serializers could be registered via reflection on the type 
being serialized and / or on a property being serialized (not sure if the 
latter granularity can be supported).
   > 
   > The annotation would probably also have to have attributes for nullability 
and reference tracking.
   > 
   > See [Slack 
message](https://fury-project.slack.com/archives/C055FN7K9FX/p1700993516418729?thread_ts=1700895387.358049&cid=C055FN7K9FX).
   
   Hi @knutwannheden , Fory support configure field nullability and reference 
tracking now. please see our doc:
   https://fory.apache.org/docs/next/guide/java/field_configuration
   
   ```java
   public class User {
       @ForyField(id = 0)
       private long id;
   
       @ForyField(id = 1)
       private String name;
   
       @ForyField(id = 2, nullable = true)
       private String email;
   
       @ForyField(id = 3, ref = true)
       private List<User> friends;
   
       @ForyField(id = 4, dynamic = ForyField.Dynamic.TRUE)
       private Object data;
   }
   ```


-- 
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