chatwork / bytearray-schema   1.0.0

Apache License 2.0 GitHub

⚠ This is no longer maintained. ⚠ schemaless byte array complex to Scala type coversion

Scala versions: 2.13 2.12 2.11

bytearray-schema

Schemaless byte-array complex from/to Scala case class converter.

CircleCI

Install

libraryDependencies ++= Seq(
  "com.chatwork" %% "bytearray-schema" % "1.0.0",
  "com.chatwork" %% "bytearray-schema-hbase" % "1.0.0",
)

Usage

Note) package name starts with tanukki since this is a fork of https://github.com/TanUkkii007/bytearray-schema

import tanukkii.bytearrayschema.BytesMapFormat
import tanukkii.bytearrayschema.hbase.HBaseBytesMapProtocol

case class HMessageBody(id: Long, message: String, created_at: Long)

object HBaseMessageBodyBytesMapProtocol extends HBaseBytesMapProtocol {
  implicit val HBaseMessageBodyFormat: BytesMapFormat[HBaseMessageBody] = bytesMapFormat8(HBaseMessageBody)
}