Reformatted csv output data.

Changed output data csv to use json for complex values.