Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b279e37

Browse files
committed
doc: Correct jsonpath string literal escapes description
The paragraph describing the JavaScript string literals allowed in jsonpath expressions unnecessarily mentions JSON by erroneously listing \v as allowed by JSON and mentioning the \xNN and \u{N...} backslash escapes as deviations from JSON when in fact both are accepted by ECMAScript/JavaScript. Fix this by only referring to JavaScript. Author: Erik Wienhold <ewie@ewie.name> Discussion: https://www.postgresql.org/message-id/flat/1EB17DF9-2636-484B-9DD0-3CAB19C4F5C4@justatheory.com
1 parent 3886530 commit b279e37

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

doc/src/sgml/json.sgml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -803,21 +803,20 @@ UPDATE table_name SET jsonb_field[1]['a'] = '1';
803803
In particular, the way to write a double quote within an embedded string
804804
literal is <literal>\"</literal>, and to write a backslash itself, you
805805
must write <literal>\\</literal>. Other special backslash sequences
806-
include those recognized in JSON strings:
806+
include those recognized in JavaScript strings:
807807
<literal>\b</literal>,
808808
<literal>\f</literal>,
809809
<literal>\n</literal>,
810810
<literal>\r</literal>,
811811
<literal>\t</literal>,
812812
<literal>\v</literal>
813-
for various ASCII control characters, and
814-
<literal>\u<replaceable>NNNN</replaceable></literal> for a Unicode
815-
character identified by its 4-hex-digit code point. The backslash
816-
syntax also includes two cases not allowed by JSON:
813+
for various ASCII control characters,
817814
<literal>\x<replaceable>NN</replaceable></literal> for a character code
818-
written with only two hex digits, and
819-
<literal>\u{<replaceable>N...</replaceable>}</literal> for a character
820-
code written with 1 to 6 hex digits.
815+
written with only two hex digits,
816+
<literal>\u<replaceable>NNNN</replaceable></literal> for a Unicode
817+
character identified by its 4-hex-digit code point, and
818+
<literal>\u{<replaceable>N...</replaceable>}</literal> for a Unicode
819+
character code point written with 1 to 6 hex digits.
821820
</para>
822821

823822
<para>

0 commit comments

Comments
 (0)