Pyspark Structured Streaming Json Schema
the method from_json requires that you provide the schema as StructType([StructField(...)]) as its second argument. For your data-stream create a StructType schema and pass it to the function as from_json(datastream,your_msg_schema) and you should be golden.
If you need any specific help on the above case, please share the code that you have tried.
How to create json schema required for spark structured streaming? 
Tried to generate using "from_json" But it's not compatible with pyspark. 
I'm using spark version 2.3.0