求大神把下面的数据,组装成一段json字符串。。。。。。。。。
var j = new { advanced_info = new { use_condition = new { accept_category = "", reject_category = "", can_use_with_other_discount = true }, @abstract = new { @abstract = "", icon_url_list = "[]" }, text_image_list = new { image_url = "", text = "" }, time_limit = new { type = "", begin_hour = 0, end_hour = 1, begin_minute = 2, end_minute = 3 }, business_service = "[BIZ_SERVICE_FREE_WIFI,BIZ_SERVICE_WITH_PET]" } };
你这个看着就是了
var j = new { advanced_info = new { use_condition = new { accept_category = "", reject_category = "", can_use_with_other_discount = true }, @abstract = new { @abstract = "", icon_url_list = "[]" }, text_image_list = new { image_url = "", text = "" }, time_limit = new { type = "", begin_hour = 0, end_hour = 1, begin_minute = 2, end_minute = 3 }, business_service = "[BIZ_SERVICE_FREE_WIFI,BIZ_SERVICE_WITH_PET]" } };
跟上面的对比
@赖先森: JSON.parse(j);
http://www.kjson.com/。json在线工具。直接将字符串填进去解析就可以