Good day. is there a way to read \n as new line fo...
# community-help
c
Good day. is there a way to read \n as new line for batch import?
h
Hi @Cris Vincent Castro, Typesense's import endpoint accepts JSONL format. You need to escape the new line characters inside the documents by replacing them with
\n
.
c
{\"sku\":"\0001\",\"id\":1....}\n{ \"sku\":"\0002\",\"id\":2....} parser error 101
h
That is escaped JSONL and is not valid. Here is an example of correct JSONL:
Copy code
{"sku":"0001","id":1}
{"sku":"0002","id":2}
You need to unescape the data first before sending it to Typesense