$str = '[{"rwx_price":388.5,"end_station_name":"长沙","swz_price":0,"swz_num":"--","to_station_name":"长沙","ydz_num":"--","yz_num":"*","rw_num":"*","arrive_days":"1","rz_num":"--","access_byidcard":"0","yz_price":138.5,"ywz_price":246.5,"sale_date_time":"1100","from_station_code":"CUW","rz_price":0,"gjrw_num":"--","to_station_code":"CSQ","ydz_price":0,"wz_price":138.5,"tdz_price":0,"run_time":"15:36","yw_num":"*","edz_price":0,"qtxb_price":0,"can_buy_now":"N","yw_price":238.5,"train_type":"K","rw_price":372.5,"note":"7月22日11点起售","train_no":"760000K5780K","train_code":"K579","from_station_name":"重庆北","run_time_minute":"936","ywx_price":255.5,"arrive_time":"05:28","start_station_name":"成都东","start_time":"13:52","wz_num":"*","edz_num":"--","qtxb_num":"--","train_start_date":"20160919","gjrw_price":0,"tdz_num":"--"},{"rwx_price":0,"end_station_name":"长沙","swz_price":0,"swz_num":"--","to_station_name":"长沙","ydz_num":"--","yz_num":"*","rw_num":"--","arrive_days":"1","rz_num":"--","access_byidcard":"0","yz_price":128.5,"ywz_price":230.5,"sale_date_time":"1100","from_station_code":"CUW","rz_price":0,"gjrw_num":"--","to_station_code":"CSQ","ydz_price":0,"wz_price":128.5,"tdz_price":0,"run_time":"14:10","yw_num":"*","edz_price":0,"qtxb_price":0,"can_buy_now":"N","yw_price":222.5,"train_type":"K","rw_price":0,"note":"7月22日11点起售","train_no":"760000K50406","train_code":"K504","from_station_name":"重庆北","run_time_minute":"850","ywx_price":237.5,"arrive_time":"06:22","start_station_name":"成都东","start_time":"16:12","wz_num":"*","edz_num":"--","qtxb_num":"--","train_start_date":"20160919","gjrw_price":0,"tdz_num":"--"},{"rwx_price":509.5,"end_station_name":"广州","swz_price":0,"swz_num":"--","to_station_name":"长沙","ydz_num":"--","yz_num":"*","rw_num":"*","arrive_days":"1","rz_num":"--","access_byidcard":"0","yz_price":180.5,"ywz_price":321.5,"sale_date_time":"1100","from_station_code":"CUW","rz_price":0,"gjrw_num":"--","to_station_code":"CSQ","ydz_price":0,"wz_price":180.5,"tdz_price":0,"run_time":"20:47","yw_num":"*","edz_price":0,"qtxb_price":0,"can_buy_now":"N","yw_price":310.5,"train_type":"K","rw_price":488.5,"note":"7月22日11点起售","train_no":"770000K35804","train_code":"K358","from_station_name":"重庆北","run_time_minute":"1247","ywx_price":331.5,"arrive_time":"20:07","start_station_name":"重庆北","start_time":"23:20","wz_num":"*","edz_num":"--","qtxb_num":"--","train_start_date":"20160919","gjrw_price":0,"tdz_num":"--" }]';

$str = json_decode($str,true); echo '<meta http-equiv="Content-type" content="text/html:charset=utf-8">';
echo '<pre>';
var_dump($str);exit;

把json数据 [ { } ] 转为数组的更多相关文章

  1. 花括号中的json数据--->转为数组array

    //正式服务器 更换航班 public function changef(){ $str = '{"airportTax":50,"arriModifyTime" ...

  2. js声明json数据,打印json数据,遍历json数据,转换json数据为数组

    1.js声明json数据: 2.打印json数据: 3.遍历json数据: 4.转换json数据为数组; //声明JSON var json = {}; json.a = 1; //第一种赋值方式(仿 ...

  3. php json字符串转为数组或对象

    从网上查到的方法是 用get_object_vars 把类类型转换成数组 然后在用foreach  遍历即可 $array = get_object_vars($test); $json= '[{&q ...

  4. 使用superobject 新建Json数据(数组)

    1. 要得到的Json数据:[{"name":"张三","age": 17},{"name":"李四" ...

  5. json数据转为对象,一般在前台把数据传回后端中使用 转https://www.cnblogs.com/zxtceq/p/6610214.html

    public static JArray GetData2JArray(string url, string key) { string jsonData = HttpHelper.HttpGet(u ...

  6. json数据转为Map集合

    我是利用Gson来弄得Gson gson = new Gson();//显得出HashMap的类型Type type = new TypeToken<HashMap<String, Str ...

  7. c# 将json数据转为键值对

    string json = "{\"orderId\":\"000001\",\"haha\":\"001\" ...

  8. python json数据的转换

    1  Python数据转json字符串 import json json_str = json.dumps(py_data) 参数解析: json_str = json.dumps(py_data,s ...

  9. 将Json数据转换为ADO.NET DataSet对象

    Json数据转换为ADO.NET DataSet其实方法有很多,Newtonsoft.Json也提供了DataSet的Converter用以转换Json数据.但是有些情况下DataSet Conver ...

随机推荐

  1. netty中级篇(2)

    上一篇 netty入门篇(1) 一.编码解码技术 如何评价一个编解码技术: 是否支持跨语言,或者说支持的语言是否丰富 编码码流大小,影响传输速度 编码和解码的性能,即时间 类库是否精致,API是否方便 ...

  2. [ An Ac a Day ^_^ ] [kuangbin带你飞]专题八 生成树 UVA 10600 ACM Contest and Blackout 最小生成树+次小生成树

    题意就是求最小生成树和次小生成树 #include<cstdio> #include<iostream> #include<algorithm> #include& ...

  3. javaee 规范技术

    J2EE的13种核心技术 一.JDBC(Java Database Connectivity) JDBC API为访问不同的数据库提供了一种统一的途径,象ODBC一样,JDBC对开发者屏蔽了一些细节问 ...

  4. springmvc框架下ajax请求传参数中文乱码解决

    springmvc框架下jsp界面通过ajax请求后台数据,传递中文参数到后台显示乱码 解决方法:js代码 运用encodeURI处理两次 /* *掩码处理 */ function maskWord( ...

  5. Chapter 21_4 捕获

    捕获功能在很多地方都在使用,就是从目标字符串中抽出匹配于该模式的内容,在指定捕获时,应将模式中需要捕获的部分写到一对圆括号内. 对于具有捕获的模式,函数match会将所有捕获到的值作为单独的结果返回. ...

  6. HTC与英特尔联手打造无线VR解决方案

    除了TPCAST无线附件组件之外,HTC早前还宣布了与英特尔合作研发WiGig无线VR解决方案,他们还愿意寻找更多的合作伙伴以带来进一步的解决方案. HTC希望确保其Vive头显可以实现无线升级,让用 ...

  7. appnium框架以及源码研究

    android4.0后,google提供了uiautomator来进行自动化方案,appium在高版本android上就是基于这个,4.0下是基于selendroid. appium相当于一个中转站, ...

  8. C#拾遗(一、基本类型)

    1. C#是一种块结构语言,用花括号{}分块,但是用#region和#endregion来定义可以展开和折叠的代码区域 #region 这是引用区 using System; ...... #endr ...

  9. LINUX利用Speedtest测速

    那么远程服务器呢?要知道大多数远程服务器是没有浏览器可以打开web页面的.用浏览器打开网页测速的瓶颈就在此,你不能按计划的对服务器进行定期的常规测试.这时需要到一个名为Speedtest-cli的软件 ...

  10. linux下安装tomcat,并设置自动启动

    在linux系统下,设置某个服务自启动的话,需要在/etc/rcX.d下挂载,还要在/etc/init.d/下写启动脚本的 在/etc/init.d/下新建一个文件tomcat(需要在root权限下操 ...