Open danmichaelo opened 1 year ago
Note: This only seems to be a problem with the inline
import – importing from a file with n10s.rdf.import.fetch
works fine with single escaped quotes!
Hi @danmichaelo ,
I think the behavior is consistent. When you use the .inline
method you need to pass a parseable string so additional escaping is needed.
Let me use a simple example in python that shows the strings we are passing to the method in each case:
this_will_fail_parsing = '\"Test \"with\" quotes\"'
print('this_will_fail_parsing: ',this_will_fail_parsing)
>> this_will_fail_parsing: "Test "with" quotes"
this_will_parse = '\"Test \\"with\\" quotes\"'
print('this_will_parse: ', this_will_parse)
>> this_will_parse: "Test \"with\" quotes"
do you agree?
JB.
Thanks, that makes sense, @jbarrasa 🙌 I was probably confused because I pasted N-triples into the "Import Data" dialog in Neosemantics and it didn't convert them:
Perhaps the real issue, if there is one, is with how the import dialog works? I think it could be argued that the import dialog should accept normal RDF input (single escaped quotes) and convert it to valid Cypher automatically? What do you think?
Sorry for the confusion btw.! Feel free to rename the issue or close it accordingly 👍
Oh! I see what you mean. You're totally right, the app should take care of the escaping and produce valid cypher, for sure. I thought you were working on the browser, that's why I suggested it was up to you to generate a correct string.
Let us have a look at that, and thanks for explaining it in detail!
Seems like there is an issue with importing strings with escaped quotes (
\"
):It works if I double-escape them:
but that's not standard in the n-triples serialization, I think.