Functional style JSON parsing in Kotlin