You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jonathan Court (JIRA)" <ji...@apache.org> on 2019/02/19 04:40:00 UTC

[jira] [Created] (KAFKA-7948) Feature to enable json field order retention in the JsonConverter

Jonathan Court created KAFKA-7948:
-------------------------------------

             Summary: Feature to enable json field order retention in the JsonConverter
                 Key: KAFKA-7948
                 URL: https://issues.apache.org/jira/browse/KAFKA-7948
             Project: Kafka
          Issue Type: New Feature
          Components: config, KafkaConnect
    Affects Versions: 2.1.1
            Reporter: Jonathan Court


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:
{code:java}
json.field.order = none|retained{code}
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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)