Comment on Ask HN: Have you found a fulfilling way to handle multi-line text with JSON?Comments−turtleyacht5moThis works with Ruby heredoc: $ irb query = <<-json { "s": "a string with newlines" } json => "{ \"s\": \"a string with\nnewlines\"\n}\n"
Comments
This works with Ruby heredoc: