打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
A MappingJacksonJsonView (springframework ) and spring-json view comparison

A MappingJacksonJsonView (springframework ) and spring-json view comparison


Since release 3.0.0.M4 the springframework provides an own json-view - MappingJacksonJsonView. It is based on the Jackson Java JSON-processor   http://jackson.codehaus.org/.

The last release of the project was spring-json-1.3.0. http://spring-json.sourceforge.net/.  It  provides some more universal and advanced filter capilities.

For testing I used the modification spring-json demoapp and swapped the view components.

Here my comparison result:

 


springframework MappingJackson JsonView
 spring-json /  sojo spring-json / json-lib  spring-json / xstream
version

 3.0.0.M4

 1.3.0 / 0.5.0

 

 

 1.3.0 / 2.2.3
 1.3.0 / 1.3
Streamingsupport X   X
JSON Hijackprotection X X X X
CustomConverter
  X X X
Global- and Feld-Errors  X X X
exceptions  X
 X X
exclude properties

 X

annotation / view property

 X

view property

 X

view property

 X 

annotation / view property

speed ++
 0 0 +
conformants

 ++

 

 0                                  no boolean isSetter,    Enumeration, sm

 ++

javascript functions

++

 

annotation support ++
 no no +
licence  GPL / ALS
 Apache2
 Apache 2
 Apache 2
Maven2 repro

 SpringSource Enterprise Bundle Repository

 Maven 2 - central repository / spring-json project repository  Maven 2 - central repository Maven 2 - central repository
Customizing  Behaviour 0 0 + ++

 

The  strength of spring-json view the good integration to spring-mvc. It provides the same binding- and validation capabilities like we now from the JstlView. It supports the Custom(Value)ConverterRegistration and error- and exception-handling.

MappingJacksonJsonView is very fast and has a good annotation support.

Fazit:

spring-json view is well designed to swap a "classic" spring-mvc application to a Web 2.0
application just by changing the view while keeping the back-end
almost unchanged. If you start a new Web 2.0
application you can use your "old" spring-mvc knowledge to design complex json communication easily.

MappingJacksonJsonView is a very fast and quick to develope way for representing a model as a json-stream. no more and less. It strickly follows the new way of spring configuration by supporting spring-mvc and jackson anotations.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
一个基于maven的 struts2.3.4.1+hibernate4.1.6+sprin...
Spring AMQP | SpringSource.org
maven和gradle的比较与使用
使用 Spring Data Repositories
spring-cloud 构建一个restful的web服务
解析mediaTypes+viewResolvers+viewResolvers
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服