Added ability to de/serialize from/to avro container. - #119
Conversation
* Added `AvroConvert.DeserializeContainer()` for deserialization (of IEnumerable<>). * Added `AvroConvert.SerializeContainer()` for serialization (of IEnumerable<>). * Added `IsEnumerable()` to `Type` extensions. * Workaround for deserialization added to `Resolver.ResolveArray()` * Added some [basic] tests.
|
Thank you for your contribution, I will do my best to review it today. Looks pretty nice at first glance! |
Updated code summary. Removed unused code. Enforced `IEnumerable` on `DeserializeContainer<T>(...)` methods.
Pushed a bug-fix and some enhancements. |
| @@ -0,0 +1,146 @@ | |||
| #region license | |||
There was a problem hiding this comment.
The default AvroConvert.Deserialize() method handles objects serialized in this way correctly. Could you please revert the changes done in the deserialization part?
|
Very nice PR, thank you. Just two minor comments from my side. When you address them, I will merge the PR, write a short doc, and create the next release. |
|
@AdrianStrugala @wdcossey what's the decision with this PR ? In general it looks like a deviation from an From the other side, this is potentially a breaking change. While I would suggest to make a decision and implement this change in the library as there are big perf improvements
Benchmark used to compare nuget |
|
Hey, |
Avro Container
AvroConvert.DeserializeContainer()for deserialization (of IEnumerable<>).AvroConvert.SerializeContainer()for serialization (of IEnumerable<>).IsEnumerable()toTypeextensions.Resolver.ResolveArray()*** I haven't had time to test everything as I only needed serialization for Azure Data Explorer