Skip to content

Commit 875f483

Browse files
author
fangq
committed
add tests for special character escape
git-svn-id: http://svn.code.sf.net/p/iso2mesh/code/trunk/jsonlab@490 786e58fb-9377-0410-9ff7-e4ac0ac0635c
1 parent 2acca67 commit 875f483

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

examples/example4.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@
3030
"Paper",
3131
"Scissors",
3232
"Stone"
33-
]
33+
],
34+
["a", "b\\", "c\"","d\\\"","e\"[","f\\\"[","g[\\","h[\\\""]
3435
]

examples/jsonlab_selftest.matlab

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,21 @@
120120
"Paper",
121121
"Scissors",
122122
"Stone"
123+
],
124+
[
125+
"a",
126+
"b\\",
127+
"c\"",
128+
"d\\\"",
129+
"e\"[",
130+
"f\\\"[",
131+
"g[\\",
132+
"h[\\\""
123133
]
124134
]
125135
}
126136
127-
{"data": [{"sample": {"rho": 1}},{"sample": {"rho": 2}},[[1,0],[1,1],[1,2]],["Paper","Scissors","Stone"]]}
137+
{"data": [{"sample": {"rho": 1}},{"sample": {"rho": 2}},[[1,0],[1,1],[1,2]],["Paper","Scissors","Stone"],["a","b\\","c\"","d\\\"","e\"[","f\\\"[","g[\\","h[\\\""]]}
128138
129139
>> >> ===============================================
130140
>> example1.json

0 commit comments

Comments
 (0)