Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialize fails for inner classes - classForName does not match schema-fqn #138

Closed
jangalinski opened this issue Sep 2, 2024 · 2 comments
Labels
Type: bug Something isn't working
Milestone

Comments

@jangalinski
Copy link
Contributor

Steps to reproduce

Use an inner serializable data class (foo.MySchemas.Bar) which has a schema fqn foo.Bar ... when we deserialize it, the default is to lookup the schema using the fingerprint and do a classForName lookup ... but this fails because class fqn and schema fqn differ.

Expected behaviour

We can serialize/deserialize inner classes

Possible Solutions:

a) use serializeName to mark the difference between schema and class - will probably not work because it is intended to work the other way around
b) use strategies to load class for schema-fqn, classForName being the simple default. Other strategies could be classGraph scanning or generation of dictonary files where we resolve fingerprint for class lookup

@jangalinski jangalinski added the Type: bug Something isn't working label Sep 2, 2024
@jangalinski jangalinski added this to the 1.12.2.1 milestone Sep 2, 2024
@zambrovski
Copy link
Contributor

Proposed solution: drop the root object generation with nested data classes for types, but generate them as top level classes

@jangalinski
Copy link
Contributor Author

We drop nested generation via #143

so we can close this. It might become relevant once we deal with #144

@jangalinski jangalinski added this to the 1.12.4.0 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants