AnsweredAssumed Answered

How to write multiple Json records to single file using disk connector

Question asked by naveenkumar.gowda923748 on Nov 26, 2016
Latest reply on Dec 5, 2016 by naveenkumar.gowda923748

I am trying to run a batch process and appending multiple JSON records to a single file (appending if file exist). But the problem is that every time that inserts as follows:

[{
"success": true,
"payload": {
/* Application-specific data would go here. */
}
}]
[{
"success": true,
"payload": {
/* Application-specific data would go here. */
}
}]
[{
"success": true,
"payload": {
/* Application-specific data would go here. */
}
}]

 

I am expecting to be:

 

[{

{
"success": true,
"payload": {
/* Application-specific data would go here. */
}
},

{
"success": true,
"payload": {
/* Application-specific data would go here. */
}
},
{
"success": true,
"payload": {
/* Application-specific data would go here. */
}
}]

 

I don't want to write multiple JSON files if that's the only option. Is there a way to combine to single file apart from retrieving one file after another and again writing to a single file.

Any suggestion?

Outcomes