I have a question about getting json into my jython script. Here's my scenario:
- I am running a python app on my laptop
- That app needs to share data with a jython app running in a hosted environment out in a 3rd party's cloud environment.
- I have no ability to add 3rd party modules to this environment (so I can't install com.xhaus.jyson for example)
- This probably means I'm limited to features that are native to java - org.json.JSONObject perhaps
So with those limitations, I want to take a dictionary object on my laptop, turn it into json, deliver it to the hosted jython app and then use the native jython or java tools to turn it back into that dictionary object so I can continue working on it in my script hosted in the cloud.
I already know how to do this in "regular" python. It's easy. import json and go nuts. But my java kung fu is weak and I've never worked in jython before.
So I'm trying to figure out if this if it's possible to do this reliably and easily using the java underlying the jython or if I'd be better off using something like ast and just send the dictionary as a string literal. I'd honestly prefer to stick with json for all the normal reasons people like json so any help with leveraging the java libraries to do this work would be appreciated.