Skip to content

Commit 157b213

Browse files
authored
TINKERPOP-3233 Added escaped characters to docs (#3383)
1 parent 2bd0280 commit 157b213

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/src/reference/gremlin-variants.asciidoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,25 @@ When documentation or code refers to a "gremlin-lang string", "canonical Gremlin
9797
traversal string that conforms to this ANTLR grammar. The `GremlinTranslator` class can convert canonical Gremlin into
9898
language-specific syntax for any supported GLV (see <<translators, Translating Gremlin>>).
9999
100+
==== String Escaping
101+
102+
When serializing string values into canonical Gremlin, all GLVs escape the following characters so that the resulting
103+
string is valid within the ANTLR grammar:
104+
105+
[cols="1,1",options="header"]
106+
|===
107+
|Character |Escape Sequence
108+
|\ |\\
109+
|" |\"
110+
|newline |\n
111+
|carriage return |\r
112+
|tab |\t
113+
|backspace |\b
114+
|form feed |\f
115+
|===
116+
117+
For example, a string value `say "hello"` would be serialized as `"say \"hello\""` in the canonical Gremlin string.
118+
100119
The following sections describe each language variant and driver that is officially TinkerPop a part of the project,
101120
providing more detailed information about usage, configuration and known limitations.
102121

0 commit comments

Comments
 (0)