I'm looking on how to use Klaxon to get my JSON into an Array for a LIstView. This is different then Java for two reasons. It is Kotlin and Klaxon.
Below is a array of zips and info for towns in a state. I'm pulling it via Fuel and I can get it into Klaxon to read parts of the objects into text fields but I want to build a list where each object has its own row. Was wondering how to get from point A klaxon into the List point B.
Not sure how to go about this.
{"towns":[{"zip":"02052","City":"Medfield","State":"MA","lat":"42.178","Long":"-71.3059"},{"zip":"02054","City":"Millis","State":"MA","lat":"42.1677","Long":"-71.3601"},{"zip":"02081","City":"Walpole","State":"MA","lat":"42.1429","Long":"-71.2571"},{"zip":"02030","City":"Dover","State":"MA","lat":"42.2341","Long":"-71.2861"},{"zip":"02056","City":"Norfolk","State":"MA","lat":"42.1185","Long":"-71.3287"},{"zip":"02032","City":"East Walpole","State":"MA","lat":"42.1548","Long":"-71.2164"},{"zip":"02062","City":"Norwood","State":"MA","lat":"42.1855","Long":"-71.2022"},{"zip":"02071","City":"South Walpole","State":"MA","lat":"42.105","Long":"-71.2705"},{"zip":"01770","City":"Sherborn","State":"MA","lat":"42.233","Long":"-71.3814"}