Skip to content

Commit 72114a6

Browse files
YakoYako
authored andcommitted
bug fixed for jsonobject null
1 parent a512237 commit 72114a6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/alibaba/fastjson/parser/DefaultJSONParser.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ public String getInput() {
191191
public final Object parseObject(final Map object, Object fieldName) {
192192
final JSONLexer lexer = this.lexer;
193193

194+
if (lexer.token() == JSONToken.NULL) {
195+
lexer.next();
196+
return null;
197+
}
198+
194199
if (lexer.token() != JSONToken.LBRACE && lexer.token() != JSONToken.COMMA) {
195200
throw new JSONException("syntax error, expect {, actual " + lexer.tokenName());
196201
}

0 commit comments

Comments
 (0)