cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <glen.ma...@verizon.net>
Subject Re: svn commit: r723397 - in /cxf/branches/2.1.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/schemas/ rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ rt/...
Date Thu, 04 Dec 2008 22:34:06 GMT
On Thu, 2008-12-04 at 19:08 +0000, sergeyb@apache.org wrote:
> Author: sergeyb
> Date: Thu Dec  4 11:08:20 2008
> New Revision: 723397
>      
> 
> Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
> URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java?rev=723397&r1=723396&r2=723397&view=diff
> ==============================================================================
> --- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
(original)
> +++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
Thu Dec  4 11:08:20 2008
> @@ -23,6 +23,7 @@
>  
>      public void writeTo(Object obj, Class<?> cls, Type genericType, Annotation[]
anns,  
> @@ -103,8 +124,22 @@
>              }
>              Marshaller ms = createMarshaller(actualObject, actualClass, genericType,
m);
>  
> -            XMLOutputFactory factory = new MappedXMLOutputFactory(namespaceMap);
> -            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);            
> +            Configuration c = new Configuration(namespaceMap);
> +            MappedNamespaceConvention convention = new MappedNamespaceConvention(c);
> +            AbstractXMLStreamWriter xsw = new MappedXMLStreamWriter(
> +                                               convention, 
> +                                               new OutputStreamWriter(os, "UTF-8"));
> +            if (serializeAsArray) {
> +                if (arrayKeys != null) {
> +                    for (String key : arrayKeys) {
> +                        xsw.seriliazeAsArray(key);

serializeAsArray(key);




Mime
View raw message