CP2JavaWS 0.4 released

Posted: April 16, 2009 in IT/Dev
Tags: , , , ,

A new version of CP2JavaWS, 0.4, is available at Sourceforge. It includes the following new features :

– Decoding and encoding now support cycles/references. Existing objects’s references are replaced with a path ($ref:<pathFromRootObject>) when encoding to JSON. The path follows EL/BeanUtils rules : someKey.anotherKey, someKey[0](key).anotherKey, [index], (key), someKey(key)[1](key2).anotherKey, etc.
When decoding, references/paths are replaced with the previously decoded objects.
A new CPPropertyUtils class allows to get/set these nestedProperties on the cllient side, in the same way as Java’s commons BeanUtils (the two frameworks manage nested dictionaries and arrays, and multiple dimensions arrays). You have to use at least commons beanutils 1.8.

– CPJSONAware categories aren’t required anymore. Automatic decoding/encoding of ivars (used when custom objects do not implement CPCoding) has been merged in to CP2JSCoder and CP2JSDecoder. Implementing CPCoding allows to set different JSON keys than ivars name (can then match Java’s objects attributes names if they differ from CP objects’s ones).

– fixed a problem with dates DST.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s