awhawks / workspacemechanic

Automatically exported from code.google.com/p/workspacemechanic
0 stars 0 forks source link

JSON-escape description for the keyboard audit #76

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
E.g. "Zorzella's bindings" needs to be saved as "Zorzella''s bindings"

Original issue reported on code.google.com by zorze...@gmail.com on 12 Oct 2011 at 3:34

GoogleCodeExporter commented 8 years ago
The JSON spec

http://www.json.org/

if that's the official spec (I presume so :)) says that strings should be 
double-quoted. I agree that single quotes look better than double quotes, but I 
think the best way to address it, is by escaping double-quoted strings 
according to the spec.

Original comment by konigsb...@gmail.com on 13 Oct 2011 at 1:59

GoogleCodeExporter commented 8 years ago
Fixed at head.

Original comment by konigsb...@gmail.com on 13 Oct 2011 at 2:04

GoogleCodeExporter commented 8 years ago

Original comment by konigsb...@gmail.com on 13 Oct 2011 at 2:04

GoogleCodeExporter commented 8 years ago
Since we output the JSON single-quoted, I put some code to prevent the 
description from containing either single quotes or backslashes. We can revisit 
this later.

PS: the original post should have said: saved as "Zorzella\'s bindings"

Original comment by zorze...@gmail.com on 13 Oct 2011 at 4:57