Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Dec 23, 2023
2 parents df6f605 + 0db6d98 commit e7f6244
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion core/src/main/java/com/alibaba/fastjson2/JSONWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.alibaba.fastjson2.util.TypeUtils;
import com.alibaba.fastjson2.writer.FieldWriter;
import com.alibaba.fastjson2.writer.ObjectWriter;
import com.alibaba.fastjson2.writer.ObjectWriterImplMap;
import com.alibaba.fastjson2.writer.ObjectWriterProvider;

import java.io.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,7 @@ protected void acceptAny(T object, Object fieldValue, long features) {
} else {
if (autoCast) {
String fieldValueJSONString = JSON.toJSONString(fieldValue);
JSONReader.Context readContext = JSONFactory.createReadContext();
if ((features & JSONReader.Feature.SupportSmartMatch.mask) != 0) {
readContext.config(JSONReader.Feature.SupportSmartMatch);
}
JSONReader.Context readContext = JSONFactory.createReadContext(features);
try (JSONReader jsonReader = JSONReader.of(fieldValueJSONString, readContext)) {
ObjectReader fieldObjectReader = getObjectReader(jsonReader);
typedFieldValue = fieldObjectReader.readObject(jsonReader, null, fieldName, features);
Expand Down

0 comments on commit e7f6244

Please sign in to comment.