implemented code for creating json file