You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When JSON serializer is used to serialize a class that comes as bytecode only is not possible to put annotations on it: defaults from ClassInformation are applied for visibility.
Could having configurable defaults defined in JsonSerializerContext or a user configurable ClassInformationProvider be a reasonable solution?
The text was updated successfully, but these errors were encountered:
This is impossible to have configurable defaults since all serializers and deserializers are generated in compile time, and thus all rules applied and resolved during compile time.
You can annotations to the classes by instrumentation. You can use either javaagent + ASM which is standard for JVM, or write a TeaVM plugin and add ClassHolderTransformer from there. Note that when you implement your own plugin (i.e. implement TeaVMPlugin interface), you should apply service loader convention (i.e. META-INF/services).
Another solution would be to add ability to add compiler plugins to Flavour that can customize default rules.
When JSON serializer is used to serialize a class that comes as bytecode only is not possible to put annotations on it: defaults from
ClassInformation
are applied for visibility.Could having configurable defaults defined in
JsonSerializerContext
or a user configurableClassInformationProvider
be a reasonable solution?The text was updated successfully, but these errors were encountered: