關於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"}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章