Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Parsing JSON in Spark scala

Highlighted

Parsing JSON in Spark scala

New Contributor

Hello,

i am trying to parse complex JSON available in RestAPI in spark using scala, but it is throwing error as

 Expected collection but got JObject(List((success,JBool(true)), (message,JString()),

 

Is there any way to insert JSON data to spark DataFrame without knowing JSON structure.

directly from Restapi I am using Spark with Scala , and it is Maven Project.

 

May someone please help me how to query RestAPI data in JSON file and insert data to Dataframe.

 

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here