Conversion of json file to Reltio Specific format

We are creating a data interface between snaplogic and reltio with a .json file.
Reltio expects the .json file to be in a specific format as below:
Notice the ‘new line’ i.e ‘\n’ inserted after every record of json data.
We tried scripts hook, regular expression with replaceAll…etc but haven’t been successful.
Any help in this regard would be appreciated.

We intend to achieve the following:

  1. Loop for json records.
  2. Fetch a record of json data.
    3 Append a new line / line feed / carriage return (and this should be visible in the RAW data preview too)
  3. Fetch another record of json data
  4. Insert this new record on a new line
  5. Store the updated file as .json

Any quick help shall be highly appreciated.


This sounds like you just need to use the JSON Formatter with “JSON Lines” option checked.

Thank you @koryknick. I did use the “JSONLines” field, but the problem is that it doesn’t include a “,” (comma) after every json record. I need a way to append a comma, and a LINEFEED, so that the new jason record is written on the next line than just appending.

Try this. Basically, it still uses the JSON Formatter with “JSON Lines” but then added a Binary to Document with no conversion and a Mapper with Document input and Binary output views to replace the newline with comma-newline before writing back to file.

Example pipeline converting a CSV to the JSON format requested attached. (2.7 KB)

Hi Kory,

Perfect! That was timely help.

Small issue, Its adding comma at the last line of the line also which is making in-valid json. Please suggest


Mithila JT

Not the most efficient, but update the expression in the Mapper snap to the following:

$content.replace(/\n/g, “,\n”).replace(/,\n$/, “”)

This will remove the comma and newline of the last record… if you want to keep the newline on the last line, use the following:

$content.replace(/\n/g, “,\n”).replace(/,\n$/, “\n”)