Assume I have a partition which looks like this

```
part1:

{"customerId":"1","name":"a"}
{"customerId":"2","name":"b"}

```

Assume I would like to change the Schema of this to Something like

```
{"data":"customers":[{"customerId":"1","name":"a"},{"customerId":"2","name":"b"}]}

```

what I tried doing was

```
case class Customer(customerId:Option[String],name:Option[String])
case class Customers(customers:Option[Seq[Customer]])
case class Datum(data:Option[Customers])

```

I tried reading the partition as Json and converting to Dataframe. 

```
val inputJson = spark.read.format("json").load("part1")
inputJson.as[Datum]

```

Somehow the Dataframe doesnt seem to implicitly infer the schema.