-
-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable json inclusions in Avro to Json serializing #799
Configurable json inclusions in Avro to Json serializing #799
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly good.
Please just add :
- configuration on application.example.yml
- some doc on README.md about this configuration
- minor review ⬆️
.registerModule(new JavaTimeModule()) | ||
.registerModule(new Jdk8Module()) | ||
.setTimeZone(TimeZone.getDefault()); | ||
System.out.println("Inclusions: " + jsonInclusions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops.. done!
|
||
public static String toJson(GenericRecord record) throws IOException { | ||
Map<String, Object> map = AvroDeserializer.recordDeserializer(record); | ||
public AvroToJsonSerializer(@Value("${akhq.avro-serializer.json.serialization.inclusions}") @Nullable List<Include> jsonInclusions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are changing the default configuration, please add old default one on the application.yml please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the old default to src/main/resources/application.yml
avro-serializer:
json.serialization.inclusions:
- NON_NULL
- NON_EMPTY
Perfect, thanks a lot 👍 |
No description provided.