Created
May 8, 2020 10:14
-
-
Save stykalin/bfc4ed3871602b72080b9704975651a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.databind.ObjectMapper | |
fun main() { | |
val info = mapOf("name" to "Alex", "age" to 35, "address" to mapOf("city" to "Ryazan", "street" to "My Street", "building" to 1)) | |
val mapper = ObjectMapper() | |
mapper.writerWithDefaultPrettyPrinter().writeValue(File("info.json"), info) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment