Right way string processing for json

Hi, how’s it going?

Need to escape a large string for send to rest API.
I have large HTML documents string from Cassandra and need send this string to API. What I haven’t tried. Now I use
import org.json.simple.JSONObject
var escapedHtml = JSONObject.escape(html)
import play.api.libs.json._
val source = Json.parse(s"""{ “url”: “$url”, “html”: “$escapedHtml”, “headers”: “$headers” }""")
val response = Http(config.api).put(Json.stringify(source)).header(“content-type”, “application/json”).asString

But I have problems :frowning:

Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character (’/’ (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature ‘ALLOW_COMMENTS’ not enabled for parser)
at [Source: (StringReader); line: 1, column: 93897]

Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value
at [Source: (StringReader); line: 1, column: 76]

Which right way to processing string?