关于json字符串解析的包

四个JSON库分别为:Gson,FastJson,Jackson,Json-lib
Gson:https://github.com/google/gson 无依赖
FastJson:https://github.com/alibaba/fastjson 无依赖
Jackson:https://github.com/FasterXML/jackson 有依赖
Json-lib:http://json-lib.sourceforge.net/index.html 有依赖(commons-beanutils.jar,commons-collections-3.2.jar,commons-lang-2.6.jar,commons-logging-1.1.1.jar,ezmorph-1.0.6.jar)
net.sf.json:有依赖(commons-beanutils-1.7.0.jar commons-collections-3.1.jar commons-lang-2.5.jar commons-logging.jar ezmorph-1.0.3.jar json-lib-2.1-jdk15.jar)

json在java中应用:
1.前台传输
2.http请求

在java中是指 json格式的字符串,本质就是字符串,是用String表示的固定格式的字符串.

{"rtnMsg":"HTTP请求异常!","rtnFlag":"-1"}
发布了66 篇原创文章 · 获赞 8 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq125281823/article/details/101036764