That regression has been fixed on the trunk and 2.3.5 snapshots. You can "fix" it right now by setting a collectionWrapperName such as "Book" or outTransformElement map pproperty which will contain a "Books":"Book" pair on JSONProvider,
Cheers, Sergey On Tue, May 17, 2011 at 5:45 AM, [email protected] <[email protected]> wrote: > >> I was concerned you'd say it does not work, as I'd really like to have a >> short break from XmljavaTypeAdapters :-). I'll have to update the client >> api >> for proxies to have adapters supported too, a bit later though... >> 2.3.4 and 2.4.0 will be released early next week, the vote is under way >> now. > > Found another error introduced in revision 1086535 (I thing I used a > revision before, so didnt realize that error). > > Namely serializing JSON top level arrays adds an "s" to the root element > name. However on the receiver side, only the not-"s" name is registered, > resulting that ElementNSImpl is again created.. > > The JSON tests didnt find this error since they explicitely set the root > name by calling setCollectionWrapperName(). > > While the additional s is no problem for XML messages, JSON messages just > have this problem. The problem can be solved by changing > > getCollectionWrapperQName(actualClass, genericType, actualObject, true); > > into > > getCollectionWrapperQName(actualClass, genericType, actualObject, false); > > in JSONProvider.java. > > Cheers, > Joerg > -- Sergey Beryozkin Application Integration Division of Talend http://sberyozkin.blogspot.com
