Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-12794

Trailing JSON tokens in DescribeProducersRequest.json can cause parse errors in some JSON parsers

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 3.0.0
    • clients
    • None
    • I am specifically trying to parse the files with the rust serde_json library.

    Description

      The schema definition for the DescribeProducersRequest see here 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              NLincoln Nathan Lincoln
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: