avro-0.4.5.4: Avro serialization support for Haskell

Safe HaskellNone
LanguageHaskell2010

Data.Avro.Decode

Contents

Synopsis

Documentation

decodeAvro :: Schema -> ByteString -> Either String (Value Type) Source #

Decode bytes into a Value as described by Schema.

decodeContainer :: ByteString -> Either String (Schema, [[Value Type]]) Source #

Decode the container eagerly. In order know whether to return an error or a successfully decoded value the whole container is decoded into a memory.

Data.Avro.Decode.Lazy provides functions to decode Avro containers in a lazy, streaming fashion.

Lower level interface

decodeContainerWith :: (Schema -> Get a) -> ByteString -> Either String (Schema, [[a]]) Source #

Decode container using a custom decoding function.

Honestly, I don't know why we still expose this function.

class GetAvro a where Source #

Methods

getAvro :: Get a Source #

Instances
GetAvro Bool Source # 
Instance details

Defined in Data.Avro.Decode.Get

Methods

getAvro :: Get Bool Source #

GetAvro Double Source # 
Instance details

Defined in Data.Avro.Decode.Get

GetAvro Float Source # 
Instance details

Defined in Data.Avro.Decode.Get

GetAvro Int32 Source # 
Instance details

Defined in Data.Avro.Decode.Get

GetAvro Int64 Source # 
Instance details

Defined in Data.Avro.Decode.Get

GetAvro ByteString Source # 
Instance details

Defined in Data.Avro.Decode.Get

GetAvro ByteString Source # 
Instance details

Defined in Data.Avro.Decode.Get

GetAvro Text Source # 
Instance details

Defined in Data.Avro.Decode.Get

Methods

getAvro :: Get Text Source #

GetAvro String Source # 
Instance details

Defined in Data.Avro.Decode.Get

GetAvro ContainerHeader Source # 
Instance details

Defined in Data.Avro.Decode.Get

GetAvro a => GetAvro [a] Source # 
Instance details

Defined in Data.Avro.Decode.Get

Methods

getAvro :: Get [a] Source #

GetAvro a => GetAvro (Maybe a) Source # 
Instance details

Defined in Data.Avro.Decode.Get

Methods

getAvro :: Get (Maybe a) Source #

(GetAvro a, Ord a) => GetAvro (Set a) Source # 
Instance details

Defined in Data.Avro.Decode.Get

Methods

getAvro :: Get (Set a) Source #

GetAvro a => GetAvro (Vector a) Source # 
Instance details

Defined in Data.Avro.Decode.Get

Methods

getAvro :: Get (Vector a) Source #

GetAvro ty => GetAvro (Map Text ty) Source # 
Instance details

Defined in Data.Avro.Decode.Get

Methods

getAvro :: Get (Map Text ty) Source #

GetAvro a => GetAvro (Array Int a) Source # 
Instance details

Defined in Data.Avro.Decode.Get

Methods

getAvro :: Get (Array Int a) Source #