You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There does not appear to be any way to encode a double quote (") scalar value (or any special character) with this library.
The YAML specification allows special characters to be escaped in double-quoted scalar values.
Also, to escape a double quote, you should be able to include it in a single-quoted string:
'"'
But YAML also supports unicode hex characters using:
"\u0022"
If this library supported just this second method, any unicode character could be included (including a double quote).
For those looking for a work-around, we used a JSON parser from the Synopse (mORMot) library. The SynCommons.pas file is all you need. Here is an example of how it would work:
uses
SynCommons;
functionDecodeEscapeSequences(const s: string): string;
beginif s.Contains('\u') thenbeginvar v := _json('{value:"' + RawUTF8(s) + '"}');
result := v.value;
Exit;
end;
result := s;
end;
Any JSON parser would probably work because the JSON standard supports these escape sequences.
The text was updated successfully, but these errors were encountered:
There does not appear to be any way to encode a double quote (
"
)scalar
value (or any special character) with this library.The YAML specification allows special characters to be escaped in double-quoted scalar values.
Also, to escape a double quote, you should be able to include it in a single-quoted string:
But YAML also supports unicode hex characters using:
If this library supported just this second method, any unicode character could be included (including a double quote).
For those looking for a work-around, we used a JSON parser from the Synopse (mORMot) library. The SynCommons.pas file is all you need. Here is an example of how it would work:
Any JSON parser would probably work because the JSON standard supports these escape sequences.
The text was updated successfully, but these errors were encountered: