0

I am converting csv to json using smooks. Output file is coming as expected but there is one trailing comma in last csv-record. In the end output is coming as this },] which will be invalid json format. If I used selector as #document and use if to check csv_record?has_next and process last record separately then it works. But I want to translate large file so I am using SAX and processing each record separately hence has_next doesn't work.

Is there any other way to get last csv-record separately? or any configuration in smooks so that it will give me valid json.

S317
  • 29
  • 1
  • 5

0 Answers0