Write generalized json file of trace