You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "wangkang (Jira)" <ji...@apache.org> on 2022/07/01 07:42:00 UTC
[jira] [Comment Edited] (FLINK-28338) org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParseException: Invalid numeric value: Leading zeroes not allowed
[ https://issues.apache.org/jira/browse/FLINK-28338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561250#comment-17561250 ]
wangkang edited comment on FLINK-28338 at 7/1/22 7:41 AM:
----------------------------------------------------------
解决方法是添加一个类似 spring.jackson.parser.allow-numeric-leading-zeros=true 这种参数。也可以不用flinksql去解析,用datastream去解析后强转数据类型。
The solution is to add a spring jackson. parser. Allow numeric leading zeros = true. You can also use datastream to resolve data types without using flinksql.
was (Author: JIRAUSER290761):
解决方法是添加一个类似 spring.jackson.parser.allow-numeric-leading-zeros=true 这种参数。也可以不用flinksql去解析,用datastream去解析后强转数据类型
> org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParseException: Invalid numeric value: Leading zeroes not allowed
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-28338
> URL: https://issues.apache.org/jira/browse/FLINK-28338
> Project: Flink
> Issue Type: Improvement
> Components: BuildSystem / Shaded
> Affects Versions: 1.13.6
> Environment: flinksql 1.13.6 ,解析kafka里面的json数据含有 0 开头的变量值
> Reporter: wangkang
> Priority: Minor
> Attachments: image-2022-07-01-11-31-32-561.png
>
>
> Caused by: org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParseException: Invalid numeric value: Leading zeroes not allowed
> at [Source: (byte[])"\{"uuid":"1285","name":"杨YP","age":01,"ts":"2022-07-01 10:33:09.553","partition":"part8"}"; line: 1, column: 38]
> at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2337)
> !image-2022-07-01-11-31-32-561.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)