Thiago Nerys
03/03/2020, 3:02 PMfun <http://java.io|java.io>.InputStream.extractSummary(): String =
((JsonSlurper().parse(this) as Map<String, Any>)["fields"] as Map<String, Any>)["summary"] as String
I looked around a lot, couldn't find a way to make this code block simpler. Would like to do something similar to Groovy, which allows me to call just this.fields.summary
.
Any ideas?ribesg
03/03/2020, 3:09 PMThiago Nerys
03/03/2020, 3:11 PMmbonnin
03/03/2020, 3:37 PMMap
and InputStream
so that it becomes this.parse().getObject("fields").getString("summary")