All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.serpro69.kfaker.Mapper.kt Maven / Gradle / Ivy

Go to download

Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymization purposes.

There is a newer version: 2.0.0-rc.7
Show newest version
package io.github.serpro69.kfaker

import com.fasterxml.jackson.databind.*
import com.fasterxml.jackson.dataformat.yaml.*
import com.fasterxml.jackson.module.kotlin.*
import java.io.*

internal object Mapper {
    private val mapper = ObjectMapper(YAMLFactory())

    init {
        mapper.registerModule(KotlinModule())
    }

    fun  readValue(inputStream: InputStream, type: Class): T = mapper.readerFor(type).readValue(inputStream)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy