This library has been deprecated. We will not accept pull requests or make any changes to this repo going forward. If you are using gfc-avro already and want to add new features or fix any bugs you may find, please fork the repo and continue development there.
An Avro library in Scala base on scala pickling. Supports the conversion of case class to avro records or schema definitions.
Converting a case class to avro
case class SomeObject(id: Int) import scala.pickling._ import com.gilt.pickling.avro._ val obj = SomeObject(1) val pckl = obj.pickle
Convert avro bytes to case class
import scala.pickling._ import com.gilt.pickling.avro._ val bytes = ... val obj = bytes.unpickle[SomeObject]
Converting a case class to avro schema
val schema = Schema[SomeObject]
- No support for Enums
- No support for fixed length.
- Schema resolution has not been implemented.
- List[Byte] and Set[Byte] should be converted avro bytes type instead of an array of bytes.
- Blocked array or maps are not supported.
- Writing case classes straight into an 'InputStream'.
Copyright 2014 Gilt Groupe, Inc.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0