You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "David Jacot (Jira)" <ji...@apache.org> on 2021/05/17 15:45:00 UTC

[jira] [Resolved] (KAFKA-12794) Trailing JSON tokens in DescribeProducersRequest.json can cause parse errors in some JSON parsers

     [ https://issues.apache.org/jira/browse/KAFKA-12794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jacot resolved KAFKA-12794.
---------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

> Trailing JSON tokens in DescribeProducersRequest.json can cause parse errors in some JSON parsers
> -------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-12794
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12794
>             Project: Kafka
>          Issue Type: Task
>          Components: clients
>         Environment: I am specifically trying to parse the files with the rust serde_json library.
>            Reporter: Nathan Lincoln
>            Priority: Trivial
>             Fix For: 3.0.0
>
>
> The schema definition for the DescribeProducersRequest see [here|https://github.com/apache/kafka/blob/3b6599c600f6e7fbeb000a088591f1cf9aba107d/clients/src/main/resources/common/message/DescribeProducersRequest.json] has trailing tokens - specifically, the last two lines in the commit in that link.
> This does not cause problems for the generator, because Jackson will ignore trailing input by default.
> However, some JSON parsers cannot be configured to ignore trailing characters, and so they fail on that file. This can cause problems for users wishing to use the official schema definitions to generate clients in other languages.
> The fix here is pretty simple - just remove the trailing tokens, and optionally configure jackson to fail on trailing tokens. I'll be submitting a patch for the former on GitHub, and I can also submit a patch for the former if there is interest.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)