scala schema json spark
df.withColumn("jsonSchema",schema_of_json(df.select(col("value")).first.getString(0)))
Source: stackoverflow.com
df.withColumn("jsonSchema",schema_of_json(df.select(col("value")).first.getString(0)))