How to read the json file into build gradle


(shaik) #1

I have a json file with contains the data as follows:
{
“type”:“xyz”,
“properties”: {
“foo”: {
“type”: “pqr”
},
“bar”: {
“type”: “abc”
},
“baz”: {
“type”: “lmo”
}
}
}

I want to read these values as strings in my build.gralde file

How can I achieve this


(Lance Java) #2

http://docs.groovy-lang.org/latest/html/gapi/groovy/json/JsonSlurper.html