Home > Back-end >  How to separate json objects by commas in a JSON file all at once
How to separate json objects by commas in a JSON file all at once

Time:06-25

I have JOSN file that has large list of JSON objects but they are separated by commas.I want to add comma between JSON objects all at once.I found the way of replacing but every JSON object in a file is starting from the new line.Below is the screenshot of file format:

enter image description here

Here every JSON object is starting from new line I have tried using find replace method in find I have added }{ and in replace with },{ but its not working.

CodePudding user response:

Why don't you replace \n{ with \n,{ and then add [ at the begging of the file and ] at the end.

  •  Tags:  
  • json
  • Related