How to properly write newline for datasets

Let’s say i have text looking like this:
example_paragraph
example_paragraph2

how can i handle the newline if i want to use JSONL?, should it be like this:

{"text": "example_paragraph\nexample_paragraph2"}

or like this:

{"text": "example_paragraph\\nexample_paragraph2"}

Thank you

The 2nd syntax (escaping the newline) should be the right one.

1 Like