title: Spark structured streaming kafka convert JSON without schema (infer schema)
body: <p>I read Spark Structured Streaming doesn't support schema inference for reading Kafka messages as JSON. Is there a way  to retrieve schema  the same as Spark Streaming does:</p>
  
  <pre><code>val dataFrame = spark.read.json(rdd.map(_.value()))
  dataFrame.printschema 
  </code></pre>