Skip to content

jangramukul/fastmapper

Repository files navigation

FastMapper

FastMapper is a kotlin DSL based auto mapping library for kotlin and android applications.

alt text

FastMapper in 2 Steps

  1. Define Mapper
val mapper = FastMapper.Builder.build {
    withMapping<ModelSource, ModelTarget>()
}
  1. Map Objects
val model = ModelSource(name = "Fastmapper")
val mappedModel: ModelTarget = mapper.map(model)

FastMapper also allowed to map fields with custom coordinates.

val mapper = FastMapper.Builder.build {
    withMapping<ModelSource, ModelTarget> {
       ModelSource::name mapTo ModelTarget::bigname
    }
}

Add FastMapper to your project

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
   repositories {
       //...
       maven { url 'https://jitpack.io' }
   }
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.mukuljangir372:fastmapper:v1.0'
}

About

FastMapper is a kotlin DSL based auto mapping library for kotlin and android applications.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages