Skip to content

Commit

Permalink
1.2.66
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Mar 1, 2020
1 parent 1bdc999 commit f164d85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/alibaba/fastjson/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -1293,5 +1293,5 @@ public static Type getMixInAnnotations(Type target) {
return null;
}

public final static String VERSION = "1.2.63";
public final static String VERSION = "1.2.66";
}
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,18 @@ public static Object parseMap(DefaultJSONParser parser, Map<Object, Object> map,
lexer.nextToken(keyDeserializer.getFastMatchToken());
}

Object key = keyDeserializer.deserialze(parser, keyType, null);
Object key;
if (lexer.token() == JSONToken.LITERAL_STRING
&& keyDeserializer instanceof JavaBeanDeserializer
) {
String keyStrValue = lexer.stringVal();
lexer.nextToken();
DefaultJSONParser keyParser = new DefaultJSONParser(keyStrValue, parser.getConfig(), parser.getLexer().getFeatures());
keyParser.setDateFormat(parser.getDateFomartPattern());
key = keyDeserializer.deserialze(keyParser, keyType, null);
} else {
key = keyDeserializer.deserialze(parser, keyType, null);
}

if (lexer.token() != JSONToken.COLON) {
throw new JSONException("syntax error, expect :, actual " + lexer.token());
Expand Down

0 comments on commit f164d85

Please sign in to comment.