Skip to content

qie.escapeJson

Signature: qie.escapeJson(value)

Returns: String escapedValue - the escaped value

Escape the value to be used in a JSON object.

Parameters

Type Name Description Default
String value the value to be escaped

Example

var jsonMessage = qie.parseJSONString('' +
   '{' +
   '  "name":"Luke Skywalker",' +
   '  "favorite quote":""' +
   '}');

jsonMessage.setNode("/favorite quote", qie.escapeJson('No!\nThat\'s "impossible!"'));