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

mapping from python to java and back #20835

Open
ehudkaldor opened this issue Mar 10, 2025 · 0 comments
Open

mapping from python to java and back #20835

ehudkaldor opened this issue Mar 10, 2025 · 0 comments

Comments

@ehudkaldor
Copy link

i am trying to generate clients for python and java in a way that python can serialize a model class (to Kafka) and loading it into Java Spring Boot application on the other end.

i have the python side generating pydantic-based models, which are great for serializtion, but on other end i cannot load them because the java generator generate model classes with camelCase field names, where the python side dumps them to json with snake_case field names.

my focus so far has been to try and get jackson to generate json mapping that would allow loading snake_case json into a model, but no success so far. i know pydantic supports serialization_alias which could be used to serialize to another name, but have had no success with this either.

anyone has any idea or experience with such a conversion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant