created a write json to file object