【发布时间】:2018-11-20 19:45:48
【问题描述】:
我正在使用 Flutter/Dart。 This endpoint 给了我这个回复:
{"listroute":[{"id":"1","route_title":"Brooklyn East","no_of_vehicle":null,"fare":"101.00","note":null,"is_active":"no","created_at":"2018-06-02 12:49:21","updated_at":"0000-00-00 00:00:00","vehicles":[{"vec_route_id":"1","id":"1","vehicle_no":"101","vehicle_model":"101","manufacture_year":"2000","driver_name":"arvind","driver_licence":"544575854","driver_contact":"1305442045","note":"","created_at":"2018-06-02 12:54:13"}]},{"id":"2","route_title":"Brooklyn South","no_of_vehicle":null,"fare":"1010.00","note":null,"is_active":"no","created_at":"2018-06-02 12:50:06","updated_at":"0000-00-00 00:00:00","vehicles":[{"vec_route_id":"3","id":"3","vehicle_no":"2145","vehicle_model":"425","manufacture_year":"2017","driver_name":"amit","driver_licence":"4526320125","driver_contact":"23054420456","note":"","created_at":"2018-06-02 12:57:23"},{"vec_route_id":"2","id":"2","vehicle_no":"1010","vehicle_model":"242","manufacture_year":"2016","driver_name":"abhisekh","driver_licence":"4526320125","driver_contact":"23054420456","note":"","created_at":"2018-06-02 12:56:41"}]},{"id":"3","route_title":"Brooklyn West","no_of_vehicle":null,"fare":"100.00","note":null,"is_active":"no","created_at":"2018-06-02 12:51:00","updated_at":"0000-00-00 00:00:00","vehicles":[]},{"id":"4","route_title":"Uppal","no_of_vehicle":null,"fare":"101.00","note":null,"is_active":"no","created_at":"2018-06-02 12:51:22","updated_at":"0000-00-00 00:00:00","vehicles":[{"vec_route_id":"6","id":"3","vehicle_no":"2145","vehicle_model":"425","manufacture_year":"2017","driver_name":"amit","driver_licence":"4526320125","driver_contact":"23054420456","note":"","created_at":"2018-06-02 12:57:23"},{"vec_route_id":"5","id":"2","vehicle_no":"1010","vehicle_model":"242","manufacture_year":"2016","driver_name":"abhisekh","driver_licence":"4526320125","driver_contact":"23054420456","note":"","created_at":"2018-06-02 12:56:41"},{"vec_route_id":"4","id":"1","vehicle_no":"101","vehicle_model":"101","manufacture_year":"2000","driver_name":"arvind","driver_licence":"544575854","driver_contact":"1305442045","note":"","created_at":"2018-06-02 12:54:13"}]},{"id":"5","route_title":"MAHE","no_of_vehicle":null,"fare":"101.00","note":null,"is_active":"no","created_at":"2018-06-02 12:51:37","updated_at":"0000-00-00 00:00:00","vehicles":[{"vec_route_id":"7","id":"2","vehicle_no":"1010","vehicle_model":"242","manufacture_year":"2016","driver_name":"abhisekh","driver_licence":"4526320125","driver_contact":"23054420456","note":"","created_at":"2018-06-02 12:56:41"}]},{"id":"6","route_title":"CMD Chowk","no_of_vehicle":null,"fare":"200.00","note":null,"is_active":"no","created_at":"2018-06-02 12:51:58","updated_at":"0000-00-00 00:00:00","vehicles":[]},{"id":"9","route_title":"x","no_of_vehicle":null,"fare":"10.00","note":null,"is_active":"no","created_at":"2018-06-11 07:22:46","updated_at":"0000-00-00 00:00:00","vehicles":[]},{"id":"10","route_title":"xy","no_of_vehicle":null,"fare":"10.00","note":null,"is_active":"no","created_at":"2018-06-11 07:22:53","updated_at":"0000-00-00 00:00:00","vehicles":[]},{"id":"11","route_title":"mmm","no_of_vehicle":null,"fare":"10.00","note":null,"is_active":"no","created_at":"2018-06-11 11:48:02","updated_at":"0000-00-00 00:00:00","vehicles":[]}],"childs":[{"transport_fees":"0.00","vehroute_id":"6","student_session_id":"1","fees_discount":"0.00","class_id":"1","class":"Nursery A","section_id":"1","section":"A","id":"1","admission_no":"1","roll_no":"01052018","admission_date":"2018-05-30","firstname":"Amit","lastname":"Teja","image":"uploads\/student_images\/no_image.png","mobileno":"09021902190","email":"amit@mailinator.com","state":null,"city":null,"pincode":null,"religion":"Teja","cast":"Gen","dob":"2016-07-06","current_address":"ttetet\r\nasdasdasd","previous_school":"","guardian_is":"father","permanent_address":"ttetet\r\nasdasdasd","category_id":"1","adhar_no":"iewk123kaqws12","samagra_id":"iewk123kaqws12","bank_account_no":"9999999999999999999999","bank_name":"CITY Bank","ifsc_code":"city000010","guardian_name":"Sumit","guardian_relation":"Father","guardian_phone":"8309632153","guardian_address":"ttetet\r\nasdasdasd","is_active":"no","created_at":"2018-06-06 11:52:43","updated_at":"0000-00-00 00:00:00","father_name":"Sumit","father_phone":"Teja","father_occupation":"Business","mother_name":"Sumitra","mother_phone":"9876543211","mother_occupation":"House Wife","guardian_occupation":"Business","gender":"Male","rte":"Yes","guardian_email":"sumit@mailinato.com"},{"transport_fees":"0.00","vehroute_id":"0","student_session_id":"2","fees_discount":"0.00","class_id":"1","class":"Nursery A","section_id":"1","section":"A","id":"2","admission_no":"2","roll_no":"01052019","admission_date":"2018-06-01","firstname":"vibhav","lastname":"Teja","image":"uploads\/student_images\/no_image.png","mobileno":"7894561230","email":"vibhav@gmail.com","state":null,"city":null,"pincode":null,"religion":"Teja","cast":"Gen","dob":"2018-06-09","current_address":"ttetet\r\nasdasdasd","previous_school":"","guardian_is":"father","permanent_address":"ttetet\r\nasdasdasd","category_id":"1","adhar_no":"iewk123kaqws12","samagra_id":"iewk123kaqws12","bank_account_no":"125423625642","bank_name":"City Bank","ifsc_code":"12542362","guardian_name":"Sumit","guardian_relation":"Father","guardian_phone":"8309632153","guardian_address":"ttetet\r\nasdasdasd","is_active":"no","created_at":"2018-06-06 11:29:26","updated_at":"0000-00-00 00:00:00","father_name":"Sumit","father_phone":"Teja","father_occupation":"Business","mother_name":"Sumitra","mother_phone":"9876543211","mother_occupation":"House Wife","guardian_occupation":"Business","gender":"Male","rte":"Yes","guardian_email":"sumit@mailinato.com"},{"transport_fees":"0.00","vehroute_id":"6","student_session_id":"11","fees_discount":"0.00","class_id":"2","class":"Nursery B","section_id":"2","section":"B","id":"5","admission_no":"1234-A1","roll_no":"0105202010","admission_date":"2018-06-11","firstname":"Rajat","lastname":"Teja","image":"uploads\/student_images\/no_image.png","mobileno":"07697019875","email":"rajat@gmail.com","state":null,"city":null,"pincode":null,"religion":"Teja","cast":"","dob":"2018-06-14","current_address":"ttetet\r\nasdasdasd","previous_school":"","guardian_is":"father","permanent_address":"ttetet\r\nasdasdasd","category_id":"3","adhar_no":"","samagra_id":"","bank_account_no":"","bank_name":"","ifsc_code":"","guardian_name":"Sumit","guardian_relation":"Father","guardian_phone":"8309632153","guardian_address":"ttetet\r\nasdasdasd","is_active":"no","created_at":"2018-06-11 07:35:54","updated_at":"0000-00-00 00:00:00","father_name":"Sumit","father_phone":"Teja","father_occupation":"Business","mother_name":"Sumitra","mother_phone":"9876543211","mother_occupation":"House Wife","guardian_occupation":"Business","gender":"Female","rte":"No","guardian_email":""}]}
如何解析这种类型的输出?
【问题讨论】:
-
你尝试了什么?
-
欢迎来到 Stackoverflow。在提出问题时,如果您提供代码,您将获得更好的答案。添加您迄今为止尝试过的内容。另请查看How to create a Minimal, Complete, and Verifiable example
-
您应该向我们提供示例或至少您尝试过的内容,以便我们能够提供帮助。不管你有没有试过这个:flutter.io/json?