Are multi-line strings allowed in JSON?

Is it possible to have multi-line strings in JSON?

It’s mostly for visual comfort so I suppose I can just turn word wrap on in my editor, but I’m just kinda curious.

I’m writing some data files in JSON format and would like to have some really long string values split over multiple lines. Using python’s JSON module I get a whole lot of errors, whether I use \ or \n as an escape.

Leave a Comment