Liking cljdoc? Tell your friends :D

Value Transformation

Terminology

TermDescription
transformation functiona function of A->B, e.g. conversion strings to dates
decodinga process of transforming (invalid) values into potentially valid ones (IN), m/decoder & m/decode
encodinga process of transforming (valid) values into something else (OUT), m/encoder & m/encode
transformera top-level component that maps Schemas with transformation functions (e.g. “json-transformer transforms strings to dates, but not strings to numbers”). Needed in encoding and decoding, mt/transformer
named transformerIf a transformer has :name defined, Schemas can define their transformation functions (for both encoding & decoding) using Schema properties
interceptora component that bundles transforming functions into transforming phases
transforming phaseeither :enter or :leave, timing when a transformation function is applied in the chain (before or after the fact)
interceptor chaina sequence of interceptors that is used to run the (optimized sequence of) transformation functions from interceptors in correct order
transformation chaintransformers compose too: (mt/transformer {:name :before} mt/json-transformer {:name :after})

Can you improve this documentation? These fine people already did:
Lucy Wang & Tommi Reiman
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close