Convert spark Dataframe with schema to dataframe of json String
问题 I have a Dataframe like this: +--+--------+--------+----+-------------+------------------------------+ |id|name |lastname|age |timestamp |creditcards | +--+--------+--------+----+-------------+------------------------------+ |1 |michel |blanc |35 |1496756626921|[[hr6,3569823], [ee3,1547869]]| |2 |peter |barns |25 |1496756626551|[[ye8,4569872], [qe5,3485762]]| +--+--------+--------+----+-------------+------------------------------+ where the schema of my df is like below: root |-- id: string