Convert dataframe to json pyspark. The issue you're running into is that when you iterate a dict ...