chcodex
chcodex
JSONObject jsonObject=new JSONObject(); JSONPath.set(jsonObject,"a/0",1); JSONPath.set(jsonObject,"a/1",2); System.out.println(jsonObject); 版本:2.0.5 期待{"a":[1,2]} 实际 {"a":2}
JSONObject jsonObject = new JSONObject(); JSONPath.set(jsonObject, "a/0/b", 1); System.out.println(jsonObject); 期待 {"a":[{"b":1}]},依然不符合预期 _Originally posted by @wenkang-du in https://github.com/alibaba/fastjson2/issues/379#issuecomment-1147111921_
使用兼容包的JSONPath.set构建json对象,内部同时存在com.alibaba.fastjson2.JSONObject和com.alibaba.fastjson.JSONObject对象
JSONObject jsonObject = new JSONObject(); JSONPath.set(jsonObject,"$a.d", new JSONObject().fluentPut("cc",1)); System.out.println(jsonObject.get("a").getClass().getName()); System.out.println(jsonObject.getJSONObject("a").get("d").getClass().getName()); 
## 问题描述 `TypeReference`(其中 `CustomList` 是自定义实现 `List` 接口的类)在 fastjson 2.x 下泛型信息丢失,元素被反序列化为 `JSONObject`。遍历时抛出 `ClassCastException: JSONObject cannot be cast to Xxx`。 fastjson 1.x (1.2.83) 无此问题。 ## 环境信息 - fastjson 版本: 2.0.62 (bundled fastjson2:...
# 兼容包 `com.alibaba.fastjson.JSONPath.set` 越界创建元素后二次 set 不同字段不生效 ## 环境 - fastjson 兼容包: `com.alibaba:fastjson:2.0.62`(或 `com.alibaba.:fastjson:2.0.62`) - 底层: `com.alibaba.fastjson2:fastjson2:2.0.62` ## 问题描述 当 `JSONPath.set` 因为越界自动扩展数组并创建 `JSONObject` 后,对该元素的**其他字段**再次调用 `JSONPath.set` 不会生效,值丢失(表现为 null/无效果)。 ## 复现步骤 ```java import...
**Problem** FileBrowser Quantum's JWT authentication never writes a user's groups into the access-control GroupMap. As a result, group-based access rules (e.g. `source denyByDefault: true` + `allow group → /path`) never...
## Problem JWT auto-created users are granted a **static** scope set: every source with `defaultEnabled: true` is appended to `BackendScopes` (`backend/pkg/settings/settings.go:97-115`), regardless of any tenant/org claim in the token. There...
Hi — thanks for FileBrowser Quantum. This is **not** a request to add lock support. It's about `OPTIONS` advertising capabilities that the server then rejects, which leads WebDAV clients to...
sql: SELECT task.actionDepts,count(task.stepId) num FROM task_nested_in_process process,process.tasks task where task.isCreatorAction=0 and process.processId=98542 group by task.actionDepts dsl: ``` { "from": 0, "size": 0, "query": { "bool": { "filter": [ { "bool":...