Skip to content

Commit b094a80

Browse files
authored
Merge pull request #23 from musikinformatik/final-touches
show how to escape escaping
2 parents 6a55b9c + d5671ed commit b094a80

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

HelpSource/Classes/JSONlib.schelp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ code::
2626
// escaping of quotes is necessary
2727
j = "{\"hello\": 42}";
2828
JSONlib.convertToSC(j);
29-
// -> -> ( 'hello': 42 )
29+
// -> ( 'hello': 42 )
30+
31+
// to avoid the need for escaping strings, you can also use a symbol.
32+
// (note that you still need to escape ' if they are in your json)
33+
j = '{"hello": 42}';
34+
JSONlib.convertToSC(j);
35+
// -> ( 'hello': 42 )
3036
::
3137

3238
Also see link::#*new:: and the link::#examples::.

0 commit comments

Comments
 (0)