How to define the schema of Nested Json File


#1

hi Friends,

I am looking to create schema of nested Json file.
my json string as below
{“WorkflowInstanceId”:“529808fb”,“Timestamp”:“2018-03-22T13:24:38.3269434-04:00”,“EventType”:“MPR_ADDED”,“Version”:“1”,“Data”:{“TransactionLocatorId”:“LOCATOR”,“TransactionOriginatorId”:“AA”,“MasterPointerId”:“2”}}

how I can define the schema using StructType?