Passing JSON format into datastore

I'm wanting to pass json format file into a CDT and ultimately into data store using the Write to Datastore Smart Service.

What's the function I need to write as per below so that I can make this work ? Can't work out how to get from json into Dictionary or List format which seems to be required ?

Parents Reply Children
No Data

 Discussion posts and replies are publicly visible