fastjson2 解决long类型带L尾缀的value
错误json格式案例
{"k":4000L ,"k2":"99L,,,99"}
// 数组L 替换为数字 但是字符串中的不能替换
解决方案
hive udf
public String evaluate(String jsStr, String jsPath) throws Exception {
// 创建JSON对象 自动解决long类型的值为 100L 这种异常格式
JSONObject jsonObject =JSON.parseObject(jsStr);
String s = jsonObject.toString();
return JSONPath.of(jsPath).extract(JSONReader.of(s)).toString();
}