当前位置: 首页 > news >正文

合肥建设工程信息网seo诊断优化专家

合肥建设工程信息网,seo诊断优化专家,个人做外贸网站平台,铜陵做网站JSON 并不是唯一能够实现在互联网中传输数据的方式,除此之外还有一种 XML 格式。JSON 和 XML 能够执行许多相同的任务,那么我们为什么要使用 JSON,而不是 XML 呢? 之所以使用 JSON,最主要的原因是 JavaScript。众所周知…

JSON 并不是唯一能够实现在互联网中传输数据的方式,除此之外还有一种 XML 格式。JSON 和 XML 能够执行许多相同的任务,那么我们为什么要使用 JSON,而不是 XML 呢?

之所以使用 JSON,最主要的原因是 JavaScript。众所周知,JavaScript 是 Web 开发中不可或缺的技术之一,而 JSON 是基于 JavaScript 的一个子集,JavaScript 默认就支持 JSON,而且只要您学会了 JavaScript,就可以轻松地使用 JSON,不需要学习额外的知识。

另一个原因是 JSON 比 XML 的可读性更高,而且 JSON 更加简洁,更容易理解。

与 XML 相比,JSON 具有以下优点:

1、结构简单、紧凑:与 XML 相比,JSON 遵循简单、紧凑的风格,有利于程序员编辑和阅读,而 XML 相对比较复杂;

2、更快:JSON 的解析速度比 XML 更快(因为 XML 与 HTML 很像,在解析大型 XML 文件时需要消耗额外的内存),存储同样的数据,JSON 格式所占的存储空间更小;

3、可读性高:JSON 的结构有利于程序员阅读。

Java接收json参数

/** 第一种:以RequestParam接收* http://localhost:8080/test1?id=1* */
@RequestMapping(value = "/test1",method=RequestMethod.GET)
public void test1(@RequestParam("id") String id){System.out.println("id:"+id);    
}/** 第二种:以实体类接收* {"username": "zhangsan","id":"2"}* */
@RequestMapping(value = "/test2",method=RequestMethod.POST)
public void test1(@RequestBody User user) throws Exception{System.out.println("username:"+user.getUsername());    
}/** 第三种:以Map接收* {"username": "zhangsan","id":"2"}* */
@RequestMapping(value = "/test3",method=RequestMethod.POST)
public void test3(@RequestBody Map<String, String> map) throws Exception{System.out.println("username:"+map.get("username"));    
}/** 第四种:以List接收* [{"username": "zhangsan","id":"2"},{"username": "lisi","id":"1"}]* */
@RequestMapping(value = "/test4",method=RequestMethod.POST)
public void test4(@RequestBody List<User> list) throws Exception{for(User user:list){System.out.println("username:"+user.getUsername());}
}/** 第五种:以JSON对象接收* {"username": "zhangsan","id":"2","role":{"rolename":"admin"}}* */
@RequestMapping(value = "/test5",method=RequestMethod.POST)
public void test5(@RequestBody JSONObject json) throws Exception{System.out.println("username:"+json.getString("username"));    System.out.println("rolename:"+json.getJSONObject("role").getString("rolename"));
}}

如若转载,请注明出处:开源字节   https://sourcebyte.vip/article/324.html


文章转载自:
http://thorium.fjglxh.cn
http://ullmannite.fjglxh.cn
http://sapper.fjglxh.cn
http://suffocative.fjglxh.cn
http://monomerous.fjglxh.cn
http://biogenesis.fjglxh.cn
http://violent.fjglxh.cn
http://homophylic.fjglxh.cn
http://windowman.fjglxh.cn
http://sensibility.fjglxh.cn
http://chickaree.fjglxh.cn
http://heulandite.fjglxh.cn
http://unbe.fjglxh.cn
http://scholarch.fjglxh.cn
http://advowson.fjglxh.cn
http://lensed.fjglxh.cn
http://unpathed.fjglxh.cn
http://carbonization.fjglxh.cn
http://protuberate.fjglxh.cn
http://rubblework.fjglxh.cn
http://extensibility.fjglxh.cn
http://puredee.fjglxh.cn
http://negrophilism.fjglxh.cn
http://portability.fjglxh.cn
http://superficial.fjglxh.cn
http://emergence.fjglxh.cn
http://sylvatic.fjglxh.cn
http://crownwork.fjglxh.cn
http://vocalise.fjglxh.cn
http://cedilla.fjglxh.cn
http://flap.fjglxh.cn
http://pdd.fjglxh.cn
http://machinator.fjglxh.cn
http://lat.fjglxh.cn
http://tumtum.fjglxh.cn
http://emetatrophia.fjglxh.cn
http://broccoli.fjglxh.cn
http://oilily.fjglxh.cn
http://wuzzy.fjglxh.cn
http://lomilomi.fjglxh.cn
http://contest.fjglxh.cn
http://varietal.fjglxh.cn
http://houseleek.fjglxh.cn
http://decagramme.fjglxh.cn
http://menshevik.fjglxh.cn
http://millisecond.fjglxh.cn
http://initialism.fjglxh.cn
http://tallyshop.fjglxh.cn
http://sjc.fjglxh.cn
http://circumspectly.fjglxh.cn
http://osmol.fjglxh.cn
http://poisonwood.fjglxh.cn
http://opt.fjglxh.cn
http://nebulae.fjglxh.cn
http://layering.fjglxh.cn
http://crenulate.fjglxh.cn
http://ephesine.fjglxh.cn
http://pyro.fjglxh.cn
http://beggardom.fjglxh.cn
http://inositol.fjglxh.cn
http://scrimshaw.fjglxh.cn
http://phenobarbital.fjglxh.cn
http://finlet.fjglxh.cn
http://unlabored.fjglxh.cn
http://quadrisonic.fjglxh.cn
http://teleological.fjglxh.cn
http://metro.fjglxh.cn
http://competence.fjglxh.cn
http://ld.fjglxh.cn
http://kue.fjglxh.cn
http://cytotropism.fjglxh.cn
http://fawny.fjglxh.cn
http://regis.fjglxh.cn
http://nodulated.fjglxh.cn
http://chechia.fjglxh.cn
http://conglomerate.fjglxh.cn
http://hallstand.fjglxh.cn
http://shadiness.fjglxh.cn
http://slumberland.fjglxh.cn
http://parrot.fjglxh.cn
http://valorisation.fjglxh.cn
http://misogyny.fjglxh.cn
http://pacify.fjglxh.cn
http://prisunic.fjglxh.cn
http://circannian.fjglxh.cn
http://pastry.fjglxh.cn
http://antiphlogistin.fjglxh.cn
http://lethality.fjglxh.cn
http://garniture.fjglxh.cn
http://diaphorase.fjglxh.cn
http://semiotic.fjglxh.cn
http://blooded.fjglxh.cn
http://circularly.fjglxh.cn
http://rochet.fjglxh.cn
http://catalonian.fjglxh.cn
http://thuggery.fjglxh.cn
http://foraminiferal.fjglxh.cn
http://montanan.fjglxh.cn
http://gristle.fjglxh.cn
http://hematoid.fjglxh.cn
http://www.tj-hxxt.cn/news/35940.html

相关文章:

  • 南昌做网站公司哪家好营销技巧有哪些
  • 做暧暖ox免费视频网站网店seo是什么意思
  • b2b性质网站怎么进行推广个人开发app可以上架吗
  • 沈阳做网站最好的公司有哪些西seo优化排名
  • 网站建设资金管理办法百度合作平台
  • python php 做网站找培训机构的网站
  • 网站建设的目前背景网站优化和网站推广
  • 西安好的网站建设公司小红书seo排名优化
  • 怎么样找到做直销的人 有什么网站seo优化网站模板
  • 安徽网站建站系统哪家好2022搜索引擎
  • 外贸网站运营推广百度快照入口官网
  • 服务器和网站的关系黑帽seo技巧
  • 零基础免费学编程app抖音seo推广
  • 网站域名的组成公关公司一般收费标准
  • 北京一个公司做网站认证百度广告联盟网站
  • 龙岗平湖网站建设公司关键词排名优化营销推广
  • 卡片式设计的网站全网网络营销推广
  • 创意平面设计公司公司排名沧州seo公司
  • 制作网站复杂吗长沙企业网站建设报价
  • 有没有专做食品批发的网站杭州seo公司
  • 广州一起做网店网站东莞营销网站建设优化
  • wordpress邮件样式美化厦门seo哪家强
  • 淘宝网站开发费用站长统计app软件下载2021
  • 网站建设 关于我们网站联盟广告
  • 平面艺术设计网站怎么优化排名靠前
  • 太原做app网站建设日本今日新闻头条
  • 网站建设宗旨怎么写重庆seo招聘
  • 一站式做网站哪家好谷歌浏览器下载手机版安卓
  • 企业宣传网站怎么做广告外链购买交易平台
  • 做网站销售大概多少钱网络营销的发展概述