Search the web
Sign In
New User? Sign Up
aalto-xml-interest · Aalto XML Parser (stax)
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
WS testing (was Re: [aalto-xml-interest] Re: Interesting Aalto refer   Message List  
Reply | Forward Message #26 of 61 |
Hi Luis! One idea occured to me today: I don't know how easy it would
be to do, but looking at wstest home page, it might be doable,
depending on how tightly coupled it is with soap and/or xml.

Anyway: I don't know if you are familiar with json, or the fastest
java json processor, Jackson (http://jackson.codehaus.org). I wrote
Jackson based on my experiences on Woodstox and Aalto, so it is rather
fast as well. In fact, slightly faster than Aalto for most cases,
although that's mostly due to json/xml differences.

But more interesting than just json reading or writing, Jackson
package also implements full data-binding support (via ObjectMapper
class); essentially subset of JAXB functionality (and similar to
JibX).
Subset because there is no standard schema language for json, so
code-first approach is supported.
Object deserialization works like:

MyBean bean = new ObjectMapper().readValue(new StringReader("{
\"count\" : 1, \"name\" : \"jackson\" ]", MyBean.class);

and serialization similarly

new ObjectMapper().writeValue(new FileWriter("result.json"), anyValueObject);

(these are using convenience methods, there are full methods too that
allow using of JsonParser, JsonGenerator etc)

Given above, it might be quite easy to implement json-based web
service, where data binding is done using Jackson instead of JAXB. I
would expect such a service to be still faster than Jibx

What do you think?

-+ Tatu +-



Sat Jan 31, 2009 6:03 am

cowtowncoder
Offline Offline
Send Email Send Email

Forward
Message #26 of 61 |
Expand Messages Author Sort by Date

Hi Luis! One idea occured to me today: I don't know how easy it would be to do, but looking at wstest home page, it might be doable, depending on how tightly...
Tatu Saloranta
cowtowncoder
Offline Send Email
Jan 31, 2009
6:03 am

... It sounds cool, I was thinking something similar but using Google Protocol Buffers, I might as well test json. It would make a nice comparison. I will try...
lfs_neves
Offline Send Email
Feb 2, 2009
4:56 pm

... Cool! I have tested PB earlier, and it's quite easy. The main challenge was that it's a bit of apples & oranges, given how tightly coupled PB is. Messages...
Tatu Saloranta
cowtowncoder
Offline Send Email
Feb 2, 2009
5:53 pm

... I've just posted my test results with JSON as an alternative serialization mechanism using the Jackson Processor... yes it is fast: ...
lfs_neves
Offline Send Email
Feb 8, 2009
6:51 pm

... Great! ... Ah, thanks, that sounds like a bug -- I think it may be due to my misunderstanding some of constants in Float/Double classes (MIN_VALUE is...
Tatu Saloranta
cowtowncoder
Offline Send Email
Feb 9, 2009
4:47 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help