Parsing python dictionary in Java using JPython

S

sandip desale

Dear All,

I have a python dictionary file. I want to create a map of that dictionary and want to use the same in my Java Program.
Can anybody please tell me how to use the same python dictionary in Java as well as in Python.

Thanks in advance...

Regards,
Sandip
 
A

Ant

It really depends on how you are trying to pass the dictionary across
to Java, what sort of objects are in the dictionary etc. Could you
provide some more background?

BTW the Java implementation of Python is now called Jython (and has
been for some years!).
 
A

Ant

This will work fine in simple cases and if the dictionaries are passed
around in repr() form.

If they are being passed pickled in some way, or the values in the
dictionary are anything other than strings, lists, dictionaries or
combinations of these then you will need something like Jython.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top