Special characters in string are not handled when doing a fetch query versus when doing a get query because the JsonParser of the library com.eclipsesource.json fails to parse in the readEscape function of JsonParser. The Get query runs fine but the fetch query fails cause it's trying to jsonify something that it can't. This is the character - \u0000.
Environment
TypeDB distribution: Core
TypeDB version: 2.25.0
Environment: Mac
Client and version: Java Driver 2.25.0
Other details:
Reproducible Steps
Set up
Running a TypeQLQuery on studio or through a driver
Execute
Fetch:
match
$entityName has attribute-name "NAME";
(roleplayer1, roleplayer2) isa relation;
fetch role1: attribute;
fails with "Expected Hexadecimal digit"
whereas the get query equivalent works fine and fetches the string with the special character.
match
$entityName has attribute-name "NAME";
(roleplayer1, roleplayer2) isa relation;
$roleplayer1 has attribute $attributeWithSpecialCharacter
get $rolePlayer1;
I also tried to find a way to find all instances of the offending character so that I could replace it:
Description
Special characters in string are not handled when doing a fetch query versus when doing a get query because the
JsonParser
of the librarycom.eclipsesource.json
fails to parse in thereadEscape
function ofJsonParser
. The Get query runs fine but the fetch query fails cause it's trying to jsonify something that it can't. This is the character -\u0000
.Environment
Reproducible Steps
Set up Running a TypeQLQuery on studio or through a driver
Execute
Fetch:
fails with "Expected Hexadecimal digit"
whereas the get query equivalent works fine and fetches the string with the special character.
I also tried to find a way to find all instances of the offending character so that I could replace it:
match $x isa attribute, $x contains "