JSON浅析
来源:互联网 发布:软件测试 cmm 编辑:程序博客网 时间:2024/05/04 21:40
一、JSON的创建
JSON类:JObject、JArray、JValue、JProperty(key/value)、JToken
1、JSON对象的创建
private JObject CreateJSON() { JObject pObject = new JObject(); pObject["name"] = this.txtName.Text.Trim(); pObject["addressAll"] = ""; pObject["lon"] = this.txtCoordX.Text.Trim(); pObject["lat"] = this.txtCoordY.Text.Trim(); pObject["geotext"] = ""; pObject["cityCode"] = "360700"; pObject["type_code"] = "030003"; pObject["creator"] = ""; pObject["province_name"] = this.cmbRegion1st.Text.Trim(); pObject["city_name"] = this.cmbRegionSecond.Text.Trim(); pObject["county_name"] = this.txtRegionThird.Text.Trim(); pObject["town_name"] = this.txtRegion4th.Text.Trim(); pObject["lat"] = this.txtCoordY.Text.Trim(); pObject["village"] = this.txtRegion5th.Text.Trim(); pObject["street"] = this.txtAddress.Text.Trim(); pObject["streetNum"] = ""; pObject["street_suffix"] = ""; pObject["community"] = this.txtResidentName.Text.Trim(); pObject["communitySuf"] = this.txtResidentSuffix.Text.Trim(); pObject["buildNum"] = ""; pObject["buildSuf"] = ""; pObject["landmark"] = this.txtLandmark.Text.Trim(); pObject["lm_suffix"] = this.txtLandmarkSuffix.Text.Trim(); return Object; }
JObject.Parse(string json);
JObject.FromObject(object o);
JObject.Load(JsonReader reader).
2、JSON数值的创建
private JArray CreateJSON() { JObject pObject = new JObject(); pObject["name"] = this.txtName.Text.Trim(); JArray jArray = new JArray(); jArray.Add(pObject); return jArray ; }
0 0
- JSON浅析
- JSON浅析
- XML vs JSON 浅析
- Android Json浅析
- JSON和XML的区别浅析
- Qt5对Json的读写总结 浅析
- 小程序app.json文件浅析
- XML,Object,Json转换之浅析Xstream的使用
- 浅析ajax请求json数据并用js解析(示例分析)
- Json--浅析android中API调用处理的
- XML,Object,Json转换之浅析Xstream的使用
- 使用苹果原生的JSON数据解析浅析
- xml和json浅析(日后有待补充)
- 深入浅析JSON.parse()、JSON.stringify()和eval()的作用详解
- 浅析json与jsonp区别及通过ajax获得json数据后格式的转换
- 浅析
- 浅析
- ACFUN弹幕视频网播放器弹幕JSON文件参数浅析
- leetcode 15. 3Sum
- 【bzoj3910】【火车】【lca+并查集】
- java解析纯真IP数据库,查询IP,导出所有数据,插入oracle
- 关于android.mk学习记录
- iOS成熟的夜间模式解决方案
- JSON浅析
- iphone开发资源汇总
- source insight 常用快捷键
- View的绘制过程
- iOS开发资源大全
- abap中TEXT_CONVERT_XLS_TO_SAP、CS_WHERE_USED_MAT的使用
- 沉浸式状态栏
- 解决phpStudy中 phpmyadmin #2002 无法登录 MySQL 服务器
- List集合的并集、交集、差集以及源码