[ https://issues.apache.org/jira/browse/SPARK-7273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14537691#comment-14537691 ]
Animesh Baranawal commented on SPARK-7273: ------------------------------------------ I am getting no error on compiling your code... can you post some more details or probably post it on the mailing list? > The SQLContext.jsonFile() api has a problem when load a format json file? > ------------------------------------------------------------------------- > > Key: SPARK-7273 > URL: https://issues.apache.org/jira/browse/SPARK-7273 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 1.3.1 > Reporter: steven > Priority: Minor > > my code as follow: > val df = sqlContext.jsonFile("test.json"); > test.json content is: > { "name": "steven", > "age" : "20" > } > the jsonFile invoke will get a Exception as follow: > java.lang.RuntimeException: Failed to parse record "age" : "20"}. > Please make sure that each line of the file (or each string in the RDD) is a > valid JSON object or an array of JSON objects. > at scala.sys.package$.error(package.scala:27) > at > org.apache.spark.sql.json.JsonRDD$$anonfun$parseJson$1$$anonfun$apply$2.apply(JsonRDD.scala:313) > at > org.apache.spark.sql.json.JsonRDD$$anonfun$parseJson$1$$anonfun$apply$2.apply(JsonRDD.scala:307) > is it a bug? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org