Skip to content

Commit 42a7281

Browse files
author
Simon MacMullen
committed
Allow strings to be quoted with "'" as well as '"'.
1 parent 990f189 commit 42a7281

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/rabbitmq/tools/json/JSONReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private Object read() {
8787
Object ret = null;
8888
skipWhiteSpace();
8989

90-
if (c == '"') {
90+
if (c == '"' || c == '\'') {
9191
next();
9292
ret = string();
9393
} else if (c == '[') {
@@ -181,7 +181,7 @@ private Object number() {
181181

182182
private Object string() {
183183
buf.setLength(0);
184-
while (c != '"') {
184+
while (c != '"' && c != '\'') {
185185
if (c == '\\') {
186186
next();
187187
if (c == 'u') {

0 commit comments

Comments
 (0)