Hi!
I’m trying to use kotlin.serialiazation in a gradle task in order to read a json file, modify it and save the file again. Open for other suggestions 🙂.
It was working with groovy using JsonSluper.
Is that possible?
Existing and working code in Groovy.
Copy code
def file = new File(path)
def data = new JsonSlurper().parse(file)
data.types = "my new value"
def json = JsonOutput.prettyPrint(JsonOutput.toJson(data))
👌 2
Ola Adolfsson
07/24/2022, 9:04 AM
@Chrimaeon How? 🙂
In my build.gradle.kts I’m trying to import