How to store `"` and `CRLF` in dgraph?

The input language is triples in the W3C standard RDF N-Quad format.

and

Literals may not contain the characters " , LF , or CR . In addition ’ \ ’ (U+005C) may not appear in any quoted literal except as part of an escape sequence.

how can I store these characters?

Dgraph does not strictly use the W3C standard. Use something similar with this standard. However, if you give an example of this literal it would help to understand how.

how to escape a line break, or a quotation mark? these mutations below are illegal.

{
  set{
    <0x58b> <description> "test
    " .
  }
}
{
  set{
    <0x58b> <description> "test"" .
  }
}

You can use any lib or site like this to test out Free Online JSON Escape / Unescape Tool - FreeFormatter.com
This is the right way:

{
  set{
    <0x58b> <description> "test\r\n"" .
  }
}

Cheers.

My bad, that works fine in ratel.

My problem is how to escape these string in java. StringEscapeUtils.escapeJava solve the problem. thanks anyway.:grin: