Netiquette · Download · News · Gallery · Homepage · DSSR · Web-DSSR · DSSR Manual · G4 Structures · DSSR-Jmol · DSSR-PyMOL · Web-SNAP

Welcome > Bug reports

JSON output should escape backslashes


When I give DSSR a filename which contains a backslash (e.g. as a path seperator on Windows), this backslash gets included in the created JSON in the fields "command", "input_file" and possibly "str_id".
This makes the JSON invalid and impossible to parse, because backslashes are escape characters in JSON and have to be escaped as "\\" to produce valid JSON.

rename 1rnk.pdb into '1rnk\something.pdb'
./x3dna-dssr -i='1rnk\something.pdb' --json

Gives a JSON including
{"command":"x3dna-dssr -i=1rnk\something.pdb --json","input_file":"1rnk\something.pdb","str_id":"1rnk\something"

instead of
{"command":"x3dna-dssr -i=1rnk\\something.pdb --json","input_file":"1rnk\\something.pdb","str_id":"1rnk\\something"

Thanks for reporting the JSON string escape bug in DSSR. Your bug report is exemplary in its clarity. I'll fix this bug and release an updated DSSR version, hopefully shortly.

Best regards,


I've updated DSSR to v1.8.5-2018nov29. The bug of not escaping backslash (or double quote) in DSSR JSON output has been fixed.

Please have a try and report back how it goes.

Best regards,



[0] Message Index

Created and maintained by Dr. Xiang-Jun Lu [律祥俊], Principal Investigator of the NIH grant R01GM096889
Dr. Lu is currently affiliated with the Bussemaker Laboratory at the Department of Biological Sciences, Columbia University.

Go to full version