According to fastjson2's official benchmark [1], fastjson2 is about 4x faster than jackson on JDK17 and 3x faster on JDK8. Similar results are observed in our production environment. In addition, UTF8 bytes <-> String conversion is much faster on JDK17 with vectorized algorithms [2][3], so even more performance boost is expected when doing JSON serde on the source/sink side where UTF8 bytes <-> String conversion is required.
[1] https://github.com/alibaba/fastjson2/wiki/fastjson_benchmark [2] https://bugs.openjdk.org/browse/JDK-8261744 [3] https://bugs.openjdk.org/browse/JDK-8275863 Best, Zhanghao Chen ________________________________ From: Xeno Amess <xenoam...@gmail.com> Sent: Saturday, August 9, 2025 22:07 To: Zhanghao Chen <zhanghao.c...@outlook.com> Cc: user@flink.apache.org <user@flink.apache.org> Subject: Re: What is the best way to play with json in flink? I notice you mean especially in jdk 17+, is there any more details about it? right now we be using flink 1.14 with jdk 8, so I do have a plan to do a whole upgradation(means to update to flink 2.1 with jdk 24/25/graalvm 24). Zhanghao Chen <zhanghao.c...@outlook.com<mailto:zhanghao.c...@outlook.com>> 于2025年8月9日周六 21:56写道: We find fastjson2 much faster than Jackson, especially with JDK17+. Best, Zhanghao ________________________________ From: Xeno Amess <xenoam...@gmail.com<mailto:xenoam...@gmail.com>> Sent: Friday, August 8, 2025 6:17:31 PM To: user@flink.apache.org<mailto:user@flink.apache.org> <user@flink.apache.org<mailto:user@flink.apache.org>> Subject: What is the best way to play with json in flink? right now we use fastjson2 (in Collector, Source, etc), but as there be an embedded jackson provided in flink, we doubt if it be worthy to migrate to using it instead. we take care of performance very much so if there be some performance benchmark please let us know... Also I'm kind of confused, so if the flink jackson have better performance, please give a link of how we shall use it now... passing JsonNode seems to be 'old style' by FLINK-32610<https://issues.apache.org/jira/browse/FLINK-32610>, but I didn't find a new usage guide...