sksamuel / avro4s

Avro schema generation and serialization / deserialization for Scala
Apache License 2.0
719 stars 238 forks source link

Option order serialization #760

Closed VankaTaganai closed 1 year ago

VankaTaganai commented 1 year ago

Hi, I've got a question about union order in option serialization. As I understand, now null type is always first in Avro Union. Is it possible to change order of null and value in schema generator?

Option[String] -> ["null", "string"] to Option[String] -> ["string", "null"]

I've tried to find out how to solve this problem but didn't find an example. Can you help me with that?

sksamuel commented 1 year ago

It's not possible, and goes against the avro guidelines.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.