io.circe.scodec
package io.circe.scodec
Value members
Concrete methods
For serialization of BitVector
we use base64. scodec's implementation of
toBase64
adds padding to 8 bits. That's not desired in our case and to
preserve original BitVector length we add a length field.
For serialization of BitVector
we use base64. scodec's implementation of
toBase64
adds padding to 8 bits. That's not desired in our case and to
preserve original BitVector length we add a length field.
Examples:
encodeBitVector(bin"101")
res: io.circe.Json =
{
"bits" : "oA==",
"length" : 3
}
encodeBitVector(bin"")
res: io.circe.Json =
{
"bits" : "",
"length" : 0
}
encodeBitVector(bin"11001100")
res: io.circe.Json =
{
"bits" : "zA==",
"length" : 8
}
- Source:
- package.scala