net.sf.json.JSONObject 和org.json.JSONObject ?的差别。 一、创建json对象 String str = "{\"code\":\"0000\", \"msg\":{\"availableBalance\":31503079.02}} org.json.JSONObject: JSONObject json = new JS...
分类:
Web程序 时间:
2014-11-04 20:00:34
阅读次数:
167
【1 操作json对象】 Ext.onReady(function(){
//var?obj?=?new?Object();
var?obj?=?{name:‘z3‘?,?age:20}; //json对象
// obj.sex?=?‘男‘; //新增属性
// obj.age?=?25?; //修改属性的值
// d...
分类:
Web程序 时间:
2014-11-04 08:09:20
阅读次数:
134
在上一篇中体验了Knockout.Validation的基本验证,本篇体验自定义验证和异步验证。 自定义验证规则 ko.validation有一个rules属性,专门用来存放验证规则,它是一个键值对集合类型,key就是自定义验证规则的名称,value是一个json对象。@{ ViewBag.Titl...
分类:
Web程序 时间:
2014-11-02 13:51:55
阅读次数:
309
本篇体验在ASP.NET MVC下使用Knockout,将使用EF Code First创建数据库。最后让Knockout绑定一个Json对象。 创建一个领域模型。namespace MvcApplication3.Models
{ public class Product { public int...
分类:
Web程序 时间:
2014-11-01 20:28:08
阅读次数:
324
监听一个model(表单),当一个model每次改变时,都会触发第二个参数函数$scope.$watch('name',function(){});//name是model名$watch也可以监听一个json对象,当第三个参数设为true时,它监听对象里的每个属性,如果没有第三个参数,只监听对象本身...
分类:
其他好文 时间:
2014-11-01 14:45:10
阅读次数:
152
字符串转对象(strJSON代表json字符串) var obj = eval(strJSON); var obj = strJSON.parseJSON(); var obj = JSON.parse(strJSON);json对象转字符串(obj代表json对象) var str = obj.t...
分类:
Web程序 时间:
2014-10-29 16:26:26
阅读次数:
136
using System.Web.Script.Serialization;using System.Collections.Generic;using System.Reflection;using System.Data;using System;namespace CommonCode{ .....
分类:
Web程序 时间:
2014-10-29 12:09:45
阅读次数:
195
@RequestMapping("/findByItem") public void findByItem(int pageNO,String userName,Date startDate,Date endDate,HttpServletResponse response)throws Excep...
分类:
编程语言 时间:
2014-10-28 23:41:23
阅读次数:
728
1.JSON(JavaScript Object Notation)一种简单的数据格式,比xml更轻巧。JSON是JavaScript原生格式,这意味着在JavaScript中处理JSON数据不需要任何特殊的API或工具包。
JSON的规则很简单:对象是一个无序的“‘名称:值’对”集合。一个对象以“{”(左括号)开始,“}”(右括号)结束。每个“名称”后跟一个“:”(冒号);“‘名称/值’对...
分类:
Web程序 时间:
2014-10-28 17:56:46
阅读次数:
240