Escape \u2028 and \u2029 in JSON output.

Closes #2169.