creating json to save from file