I have a valid JSON file
[[{"eventEndTimestamp":"2019-05-07T03:48:01Z","eventStartTimestamp":"2019-05-07T03:48:01Z","sourceSystem":"X1","transactionCode":"asdf","transactionSuccessIndicator":"Y"}],[{"eventEndTimestamp":"2019-05-07T03:48:04Z","eventStartTimestamp":"2019-05-07T03:48:04Z","sourceSystem":"X2","transactionCode":"qwerty","transactionSuccessIndicator":"Y"}]]
But when I print it in spark console, I'm getting the dataframe but with null values. The dataframe columns are inferred from this file correctly with null values. The code is working fine with other JSON files but not this one.
Output:
Batch: 0
-------------------------------------------
+-----------------+-------------------+----------------+--------------------------------+---------------------------+
|eventEndTimestamp|eventStartTimestamp|sourceSystem|transactionCode|transactionSuccessIndicator|
+-----------------+-------------------+----------------+--------------------------------+---------------------------+
| null| null| null| null| null|
+-----------------+-------------------+----------------+--------------------------------+---------------------------+