fastjson2 icon indicating copy to clipboard operation
fastjson2 copied to clipboard

🚄 FASTJSON2 is a Java JSON library with excellent performance.

Results 392 fastjson2 issues
Sort by recently updated
recently updated
newest added

### 问题描述 *简要描述您碰到的问题。* AutoType long类型解析成Integer,请看代码 ### 环境信息 *请填写以下信息:* - OS信息: [e.g.:windows ] - JDK信息: [e.g.:Openjdk 1.8.0_221] - 版本信息:[e.g.:Fastjson2 2.0.49] ### 重现步骤 *如何操作可以重现该问题:* 执行代码 ```java @Test public void testLong() { String...

bug
fixed

### 环境信息 - OS信息: window7 - JDK信息:Openjdk 11 - 版本信息:Fastjson2 2.0.50 String json = "[{\\"a\\":998982405},{\\"a\\":998992165},{\\"$ref\\":\\"$[1]\\"}]"; ConcurrentLinkedQueue list= JSON.parseObject(json, new TypeReference(){}); 报错: Exception in thread "main" com.alibaba.fastjson2.JSONException: jsonpath not support operate...

bug
fixed

` String str = "[{\"type\": \"STRING11\", \"@type\": \"com.miyo.product.qingkong.logic.engine.abstraction.rule.bo.RuleOutputFieldDefinitionBO\", \"displayName\": \"_id\", \"logicalName\": \"_id\"}, {\"type\": \"STRING11\", \"@type\": \"com.miyo.product.qingkong.logic.engine.abstraction.rule.bo.RuleOutputFieldDefinitionBO\", \"displayName\": \"_desc\", \"logicalName\": \"_desc\"}, {\"type\": \"INTEGER\", \"@type\": \"com.miyo.product.qingkong.logic.engine.abstraction.rule.bo.RuleOutputFieldDefinitionBO\", \"displayName\": \"age\", \"logicalName\": \"age\"}]"; List list3...

question

请问下,什么情况下会报这个错误: Caused by: java.lang.OutOfMemoryError: try enabling LargeObject feature instead at com.alibaba.fastjson2.JSONWriterUTF8.ensureCapacity(JSONWriterUTF8.java:2122) ~[fastjson2-2.0.50.jar:?] at com.alibaba.fastjson2.JSONWriterUTF8.writeStringUTF16(JSONWriterUTF8.java:570) ~[fastjson2-2.0.50.jar:?] at com.alibaba.fastjson2.writer.OWG_14_27_BaseCar.write(Unknown Source) ~[?:?] at com.alibaba.fastjson2.writer.ObjectWriterImplList.write(ObjectWriterImplList.java:364) ~[fastjson2-2.0.50.jar:?] at com.alibaba.fastjson2.writer.ObjectWriterArray.write(ObjectWriterArray.java:103) ~[fastjson2-2.0.50.jar:?] at com.alibaba.fastjson2.writer.OWG_3_3_Result.write(Unknown Source) ~[?:?] at...

question

### 请描述您的需求或者改进建议 The project heavily relies on `ThreadLocal` objects, which can cause explosive memory growth with `Virtual Threads`. In theory, `ThreadLocals` have relatively no effect with Virtual Threads since its...

enhancement

### 问题描述 [https://github.com/alibaba/fastjson2/blob/main/core/src/test/java/com/alibaba/fastjson2/v1issues/JSONObjectTest3C.java](url) 使用fastjson兼容无法通过,fastjson 1.x可以通过。 非标场景请考虑酌情修复吧 ### 环境信息 - OS信息: [e.g.:CentOS 8.4.2105 4Core 3.10GHz 16 GB] - JDK信息: [e.g.:Openjdk 1.8.0_312] - 版本信息:[e.g.:Fastjson2 2.x.x] ### 相关日志输出 com.alibaba.fastjson2.JSONException: This method 'xx' is...

bug

### 问题描述 https://github.com/alibaba/fastjson2/blob/334d25696654bb4e0593db33c4ec47afaa217cd9/core/src/test/java/com/alibaba/fastjson2/v1issues/issue_3900/Issue3922.java#L13 fastjson兼容解析`"$ref"`的json对象后使用get出现ClassCastException。 ### 环境信息 - OS信息: [MacOS 12.7.4 M1 Pro 16 GB] - JDK信息: [Openjdk 17.0.6] - 版本信息:[Fastjson 2.0.51] ### 重现步骤 ```java import com.alibaba.fastjson.JSONObject; import org.json.JSONException; import org.junit.jupiter.api.Test;...

bug

### 问题描述 *简要描述您碰到的问题。* ### 环境信息 *请填写以下信息:* - OS信息: MacOS - JDK信息:java version "1.8.0_361" - 版本信息:Fastjson2 2.0.1 ### 重现步骤 1. 使用 `static List parseArray(String str, Type itemType)` 方法 2. 输入 `null`...

bug

### 问题描述 #2520, #2534, #2748 如果使用JSONPath.eval 依旧存在问题: java.lang.ClassCastException: class com.alibaba.fastjson2.JSONArray cannot be cast to class com.alibaba.fastjson.JSONArray java.lang.ClassCastException: com.alibaba.fastjson2.JSONObject cannot be cast to com.alibaba.fastjson.JSONObject

bug

### 问题描述 [https://github.com/alibaba/fastjson/issues/1089](url) ,fastjson兼容依旧存在此问题。 ### 环境信息 - OS信息: [MacOS 12.7.4 M1 Pro 16 GB] - JDK信息: [Openjdk 17.0.6] - 版本信息:[Fastjson 2.0.51] ### 重现步骤 ```java import com.alibaba.fastjson.JSON; import org.junit.jupiter.api.Test; import static...

bug