convert dataframe to json spark. There are any references about convert dataframe to json spark in here. you can look below.