FunKction
2015-06-03 19:30:56 UTC
我使用Ethernet Shield和Arduino以JSON格式從服務器獲取數據。請求看起來像這樣:
client.println(“ GET http://ramp.local/api/actions?”);
響應我get is:
[{“ action_id”:1,“ action_type”:“ up”,“ action_status”:“ new”,“ ramp_id”:31,“ user_id”:17}, {“ action_id”:2,“ action_type”:“向下”,“ action_status”:“新”,“ ramp_id”:32,“ user_id”:20},{“ action_id”:3,“ action_type”:“向上” ,“ action_status”:“已完成”,“ ramp_id”:32,“ user_id”:17},{“ action_id”:4,“ action_type”:“ up”,“ action_status”:“失敗”,“ ramp_id”:31 ,“ user_id”:17}]
如何在字符串變量中收集數據並進行解析以獲取 action_status
?