We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用clickhouse-java 的jdbc驱动,对select count(1) 查询的结果序列化返回数据时,不支持UnsignedLong等UnsignedXxx 类型,目前看其他json 框架均支持
如何操作可以重现该问题:
<dependency> <groupId>com.clickhouse</groupId> <artifactId>clickhouse-jdbc</artifactId> <version>0.6.5</version> <classifier>http</classifier> </dependency>
public static void main(String[] args) throws JsonProcessingException { UnsignedLong unsignedLong = UnsignedLong.valueOf(123456789L); Map<String, Object> map = new HashMap<>(); map.put("count", unsignedLong); //fastjson2 System.out.println("fastjson2: " + JSONObject.toJSONString(map)); //jackson ObjectMapper objectMapper = new ObjectMapper(); System.out.println("jackson: " + objectMapper.writeValueAsString(map)); //hutool-json System.out.println("hutool-json: " + JSONUtil.toJsonStr(map)); //gson Gson gson = new GsonBuilder().create(); System.out.println("gson: " + gson.toJson(map)); }
正常输出count
fastjson2: {"count":{}} jackson: {"count":123456789} hutool-json: {"count":123456789} gson: {"count":{"value":123456789}}
The text was updated successfully, but these errors were encountered:
https://github.com/alibaba/fastjson2/releases/tag/2.0.53 问题已修复,请用新版本
Sorry, something went wrong.
wenshao
No branches or pull requests
问题描述
使用clickhouse-java 的jdbc驱动,对select count(1) 查询的结果序列化返回数据时,不支持UnsignedLong等UnsignedXxx 类型,目前看其他json 框架均支持
环境信息
重现步骤
如何操作可以重现该问题:
期待的正确结果
正常输出count
相关日志输出
fastjson2: {"count":{}}
jackson: {"count":123456789}
hutool-json: {"count":123456789}
gson: {"count":{"value":123456789}}
附加信息
The text was updated successfully, but these errors were encountered: