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

Communicating JSON data between Java and Python #549

Open
aghasemi opened this issue Aug 21, 2024 · 1 comment
Open

Communicating JSON data between Java and Python #549

aghasemi opened this issue Aug 21, 2024 · 1 comment

Comments

@aghasemi
Copy link

Describe the problem
Is there a "recommended" way to pass JSON data between Java and Python code, apart from serialising it first?
There are many JSON parsing libraries for Java. Do any of them work better with JEP?

In my use case, when I get a JSOn object as return value of Python code and pass it back later to another Python code ( in the same JEP Interpreter), it does not have the keys it is supposed to have. Also passing a Jackson ObjectNode to Python does not work. Is there any way to make it work? Any code sample maybe?

Many thanks.

@bsteffensmeier
Copy link
Member

There is no recommended way to pass around JSON data. In general builtin types like Maps, Lists, and dicts should fully convert between languages so simple structures work. But more complex objects should also be accessible between languages. If you have a code sample showing the problems you are having I might be able to provide more information on what is going wrong in your case.

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

2 participants