I tried this solution, and the highest ranking solution here and none work.
I have a java automation script that I need to run a python script remotely while giving it a JSON object to treat as a dictionary.
JSON object as the java give it: {\'oracle_11gd.pcap\': \'19.0.0.10\' ,\'oracle_11g_also.pcap\': \'19.0.0.17\'}
The object is actually longer, I just gave a sample here.
The solution each fails, and I suspect it's because of the backslashes, but I can't even bring it in as a string to replace the backslash with nothing, like this:
data = str(sys.argv[1])
data = data.replace("\\", "")
transportDictionary = ast.literal_eval(data)
I tried just
data = sys.argv[1]
Also didn't work.