September 2017
Beginner to intermediate
304 pages
7h 2m
English
To understand how to parse (that is, unmarshal) JSON data in Go, we will be using some data from the Citi Bike API (https://www.citibikenyc.com/system-data), a bike-sharing service operating in New York City. Citi Bike provides frequently updated operational information about its network of bike sharing stations in JSON format at https://gbfs.citibikenyc.com/gbfs/en/station_status.json:
{ "last_updated": 1495252868, "ttl": 10, "data": { "stations": [ { "station_id": "72", "num_bikes_available": 10, "num_bikes_disabled": 3, "num_docks_available": 26, "num_docks_disabled": 0, "is_installed": 1, "is_renting": 1, "is_returning": 1, "last_reported": 1495249679, "eightd_has_available_keys": false }, { "station_id": "79", "num_bikes_available": ...Read now
Unlock full access