Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is the new proposed avro entrypoint 🥳
Goal
Provide an unified, easy and extensible way of encoding and decoding avro. Unified and easy as it should only have methods on the
Avro
class (no streams, no builders, ...). Extensible as avro can be used in multiple contexts, and some requires adding some metadata (data files) or schema info (confluent schema registry, single object).Closes #163 #141
Requirements to merge:
Breaking changes:
AvroInputStream
andAvroOutputStream
, thanks to theencodeSequenceXxx
anddecodeSequenceXxx
replacements withAvroSerializationDelegate
encodeToByteArray
anddecodeFromByteArray
will now be pure avro (no header, just the encoded data itself without decorators) while before it was inData
mode (avro data file format)Tickets to open after that:
The methods
Each base method having a
Schema
and aSerializerStrategy
orDeserializerStrategy
has its related extension method to automagically get theSerializerStrategy
orDeserializerStrategy
and the schema from the reified type.We now fully support java streams and ByteArray.
We are now able of streaming the avro contents with the new
encodeSequence
anddecodeSequence
methods, useful for reading avro files by example!Example of usage