Forum Stats

  • 3,840,201 Users
  • 2,262,573 Discussions
  • 7,901,167 Comments

Discussions

Unable to append new JSON file using File Adapter

Hi Expert,

I am working on one requirement where I have to write a JSON file using File Adapter. All contents should be appended in a single file. I am using File adapter with JSON interchange format.

{

 "empId" : 123,

 "empName" : "abc" 

}{

 "empId" : 345,

 "empName" : "def" 

}{

 "empId" : 456,

 "empName" : "xyz" 

}


Here }{ are coming in same line which is causing a problem. Is there a way so new JSON file will be written to new line like follows.

{

 "empId" : 345,

 "empName" : "def" 

}

{

 "empId" : 456,

 "empName" : "xyz" 

}