toEncodable method

String toEncodable()

Implementation

String toEncodable() {
  return replaceAll(r'\', r'\\')
      .replaceAll('"', r'\"')
      .replaceAll("'", r"\'")
      .replaceAll('\n', r'\\n')
      .replaceAll('\r', r'\\r')
      .replaceAll('\t', r'\\t');
}