chcodex
chcodex
另:使用兼容包 JSON.parseObject后内部的JSONobject为fastjson2.x的对象
String text = "{\n" + " \"a\": {\n" + " \"b\": 0,\n" + " \"c\": 2\n" + " }\n" + "}"; JSONObject jsonObject = JSON.parseObject(text); JSONPath.remove(jsonObject, "$..b"); System.out.println(JSON.toJSONString(jsonObject, JSONWriter.Feature.WriteNulls)); 这个是fastjson2...
String text = "{\n" + " \"a\": {\n" + " \"b\": 0,\n" + " \"c\": 2\n" + " }\n" + "}"; JSONObject jsonObject = JSON.parseObject(text); JSONPath.remove(jsonObject, "$..b"); System.out.println(JSON.toJSONString(jsonObject, SerializerFeature.WriteMapNullValue)); 这是fastjson1...
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());  是使用JSONPath.set后发现的,不是parseObject,前面描述有误
> ``` > 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()); > ``` > >  > > 是使用JSONPath.set后发现的,不是parseObject,前面描述有误 这个问题还未修复吧
> 是两个事情了,你能再建一个issue么? 行,我再建一个issue
补充说明:本 issue 使用的是**兼容包** `com.alibaba:fastjson:2.0.62`(统一 artifact,内部 bundled fastjson2 2.0.61),而非直接使用 `com.alibaba.fastjson2:fastjson2` 核心库。 实际上 fastjson2 核心库 2.0.61 对 `TypeReference` 单元素场景**直接抛 JSONException**(不会出现类型丢失为 JSONObject 的情况),但兼容包 `com.alibaba:fastjson:2.0.62` 的桥接层在单元素场景下表现不同——不会抛异常,而是返回元素为 JSONObject 的 CustomList,延迟到遍历时才暴露问题。 两种失败模式: | 场景 | fastjson2...
**A concrete implementation proposal** (mirrors the OIDC path; applies to both v1.5.0-stable and v2.0.0-preview) **Change:** `backend/http/auth.go` → `setupJwtUser(...)`, right after the existing `userGroups` check: ```go // Sync JWT groups with...
> I see you ran V2.0.0 does this resolve this issue? There is no perfect solution, please see my latest issue