Hi

On Wed, Mar 30, 2011 at 11:25 AM, Sergey Beryozkin <[email protected]>wrote:

> Hi Joerg
>
> On Wed, Mar 30, 2011 at 11:06 AM, [email protected] <[email protected]
> > wrote:
>
>>
>>  Please see [1], I've just uploaded a slightly refactored patch, named
>>> json-collections.patch.
>>> Can you please look at it ? Just something minor is missing, I can get to
>>> it
>>> later on, but if you can apply it to the latest code and see where the
>>> missing bit is then may be we can close [1] :-)
>>>
>>>
>> I have fixed something in MappedXMLStreamReader, in the constructor:
>>
>> this.node = new Node(null, rootName, obj, convention);
>>
>> instead of
>>
>> this.node = new Node(null, rootName, ((JSONArray)top).getJSONObject(0),
>> convention);
>>
>> So the old implementation just not read the array items with index>0.
>>
>>
This change is causing a MappedXMLStreamReaderTest.testMultipleArrays test
failure, can you check it please ?

thanks, Sergey



> Also after the line ..
>>
>> nextKey = node.getName().getLocalPart();
>>
>> .. I inserted following:
>>
>> if (!"".equals(node.getName().getNamespaceURI()))
>>                                        nextKey =
>> this.convention.getPrefix(node.getName().getNamespaceURI()) + "." + nextKey;
>>
>> So actually to qualify "nextKey" if there is namespace info. This is
>> required for testReadQualifiedCollection() as it uses the qualified name
>> "ns1.thetag". When not augmenting with this qualification, the collection
>> component type just cannot be resolved, resulting that a generic
>> ElementNSImpl instead of the collection component type is instantiated.
>>
>> So with these two changes, all tests of JSONProviderTest run,
>> and also all of mine tests (I do not use any explicite namespaces or
>> qualified JSON attribute names).
>>
>>
> Brilliant, thanks.
>
>
>> Sergey , can you check-in these changes?
>>
>>
> I'm not a committer but I will try to make sure the changes make it into
> the trunk. I'll run Jettison tests locally and create a JIRA with your patch
> and send you the link. There's another Jettison related issue open in CXF -
> will have to address it too. Looks like we do have a chance to have Jettison
> 1.2.1 out before 2.4.0 is released :-).
>
> Cheers, Sergey
>
> Cheers,
>> Joerg
>>
>
>
>
> --
> Sergey Beryozkin
>
> Application Integration Division of Talend <http://www.talend.com>
> http://sberyozkin.blogspot.com
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com

Reply via email to