什么是呈现JSON数据在JSP中的最佳实践? [英] What's the best practice to render JSON data in JSPs?

查看:97
本文介绍了什么是呈现JSON数据在JSP中的最佳实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要呈现的JSON数据,我的JSP的一些AJAX请求。我想知道什么是做它的易用性和稳定性方面的最佳途径。

I need to render JSON data in my JSPs for some AJAX requests. I'd like to know what's the best way to do it in terms of easy to use and stability.

推荐答案

我假设你已经签出json.org已经...

I'm assuming you have checked out json.org already...

我最近从JSON-lib中切换到XSTREAM:

I recently switched from json-lib to XStream:

HTTP://xstream.$c$chaus.org/

肯定要容易得多。的code短短的几行,就大功告成了。请注意,它开始作为一个XML序列化器,解串器。它现在支持JSON输出中。

Definitely much easier. Just a few lines of code and you are done. Note, it started as an XML serializer, deserializer. It now supports JSON ouput.

这篇关于什么是呈现JSON数据在JSP中的最佳实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆