Hey everyone, I got tired of having to write mappi...
# feed
t
Hey everyone, I got tired of having to write mapping functions between my network and business layers and even moreso of having to update them every time one of my models changes. Because of this I built kmap, a KSP processor that generates mapping functions for all of your mapping needs. You can use it to: • do plain Source -> Target mappings • do mappings where the property names differ between Source and Target • transform properties in the mapping process • Map from many -> one properties You just add the
@KmapTo
or
@KmapFrom
annotation to your model, reference the class you want to map to (or from) and kmap will generate an extension function in the form of
fun Source.toTarget()
for you. Currently kmap does not support nested mappings, however this is high priority on the Roadmap.
K 8