flyhelanman

Results 6 comments of flyhelanman

how can i delete the dropdown values ? thx

> see this source code : https://github.com/MobileTribe/commit-template-idea-plugin/blob/master/src/com/leroymerlin/commit/GitLogQuery.java , use "git log cmd" to show dropdown values ,so it can not delete。

> I had a similar issue recently and the following worked for me (SpringBoot 2.4): > > ```java > import com.fasterxml.jackson.core.JsonProcessingException; > import com.fasterxml.jackson.databind.DeserializationFeature; > import com.fasterxml.jackson.databind.JsonNode; > import com.fasterxml.jackson.databind.ObjectMapper;...

> 参考 #3549,关闭FieldSmartMatch功能即可精准匹配字段 #3549的问题是反序列化的时候的操作,楼主的问题是序列化的时候,所以关闭FieldSmartMatch对序列化不起作用

我去翻看了下1.2.60版本 fastjson中JSON.toJSONString的源码,发现TypeUtils中computeGetters方法的逻辑如下图 ![image](https://github.com/alibaba/fastjson/assets/18319435/b13ed327-4595-49fe-a802-a0b02c8ca429) 如果属性名是以_开头则从get方法的第四位开始截取, 作为对比,我又去翻了高版本1.2.83版本的fastjson源码,发现其中做了修改,改成了从第三位开始截取,这样就不会丢失属性开头的_了 ![image](https://github.com/alibaba/fastjson/assets/18319435/8c15300d-d875-46b7-a372-c62555bd062c)

至于解决办法可以在字段上增加JSONField注解,因为源码中会优先判断有没有JSONField注解有的话使用注解中配置的name,没有则调用get方法,当然升级一下fastjson版本也可以,但是不确定从哪个版本开始fastjson在序列化的时候做了这个逻辑修改。