avro-0.4.4.2: Avro serialization support for Haskell

Safe HaskellNone
LanguageHaskell2010

Data.Avro.Decode.Lazy.Deconflict

Synopsis

Documentation

deconflict Source #

Arguments

:: Schema

Writer schema

-> Schema

Reader schema

-> LazyValue Type 
-> LazyValue Type 

deconflict writer reader val will convert a value that was encoded/decoded with the writer's schema into the form specified by the reader's schema.

deconflict will attempt resolving TypedName constructors to make sure that they are handled correctly. This has a performance impact. To avoid it use deconflictNoResolve when possible.

deconflictNoResolve Source #

Arguments

:: Schema

Writer schema

-> Schema

Reader schema

-> LazyValue Type 
-> LazyValue Type 

deconflict writer reader val will convert a value that was encoded/decoded with the writer's schema into the form specified by the reader's schema.

A faster version of deconflict which does not attempt to resolve TypedName references. It still checks if the referenced type has the same name, but does not traverses these references.

deconflictNoResolve should typically be used when a number of values are decoded with the same reader and writer schemas. In this case schemas can only be resolved once to be used in deconflictNoResolve.