How to read JSON file and create a schema using pyspark function.
That's probably a question best asked on Stack Overflow.