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

Feature to enable json field order retention in the JsonConverter

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: config, KafkaConnect
    • Labels:
    • Flags:
      Patch

      Description

      We need to maintain the order of fields in json structures that pass through kafka connect. To achieve this a new configuration item has been added to the JsonConverter to engage the retention of field order in jsons between the input and output.

      While the json spec doesn't require fields to be ordered it is required in instances where the parsers of json are primitive and difficult to correct - i.e. our mainframe.

      The new config item is:

      json.field.order = none|retained

      where the default is none and maintains the current functionality, and the option of 'retained' causes the underlying converter to use a LinkedHashMap in place of a HashMap and keeps the json fields in the order they're received during processing.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                joncourt Jonathan Court
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: