I am trying to run a python script in the script snap that mocks up some test data for unit testing pipelines. The script relies on python data types such as list and dictionary to iterate through the incoming JSON document and manipulate it.
However, the document coming in are of type java.util.LinkedHashMap. When trying to convert to a python dict using dict(in_doc), it doesn’t process the document into a dict correctly.
Initial googling returned a number of jython bug around this issue. Is there any workaround for this that I can implement?
You can see the script here: https://github.com/jskrable/test-file-gen/blob/master/snap-file-gen.py