Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data DecodeError
- decodeWithSchema :: (MonadIO m, FromAvro a) => SchemaRegistry -> ByteString -> m (Either DecodeError a)
- extractSchemaId :: ByteString -> Maybe (SchemaId, ByteString)
Documentation
data DecodeError Source #
decodeWithSchema :: (MonadIO m, FromAvro a) => SchemaRegistry -> ByteString -> m (Either DecodeError a) Source #
Decodes a provided Avro-encoded value. The serialised value is expected to be in a "confluent-compatible" format where the "real" value bytestring is prepended with extra 5 bytes: a "magic" byte and 4 bytes representing the schema ID.
extractSchemaId :: ByteString -> Maybe (SchemaId, ByteString) Source #