本文主要是介绍jackson处理json时后台大写到前台变小写的解决办法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
最近在自己研究,项目中用springmvc+mybatis,返回用@responsebody自动处理json,Jackson在解析返回的json字符串时始首字母是小写。网上查了很多资料,才找到解决方法
这样出口返回的json就是全部大写的了:
{"dateFormat":"yyyy-MM-dd","items":[{"ORG":null,"LORE_ID":"2","LORE_NO":"1212","LORE_TITLE":"34","LORE_TYPE"
:"应急知识","AUTHOR":"zshake","EDITOR":"
","EDIT_DATE":"2013-06-03","SOLUTION":"zshake
zshake
","CREATE_DATE":null,"STATE_DATE":null,"STATE":null},{"ORG":null,"LORE_ID":"3","LORE_NO":"35435"
,"LORE_TITLE":"4543","LORE_TYPE":"应急知识","AUTHOR":"4354","EDITOR":"543","EDIT_DATE":"2013-06-02","SOLUTION"
:"435","CREATE_DATE":null,"STATE_DATE":null,"STATE":null},{"ORG":null,"LORE_ID":"1","LORE_NO":"423432"
,"LORE_TITLE":"423","LORE_TYPE":"应急知识","AUTHOR":"23423","EDITOR":"432432","EDIT_DATE":"2013-06-02","SOLUTION"
:"324","CREATE_DATE":null,"STATE_DATE":null,"STATE":null}],"total":"11"}
这篇关于jackson处理json时后台大写到前台变小写的解决办法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!