cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Chaffee (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-3861) Allow indentation of xml and json based on query parameter
Date Tue, 18 Oct 2011 22:53:11 GMT
Allow indentation of xml and json based on query parameter 
-----------------------------------------------------------

                 Key: CXF-3861
                 URL: https://issues.apache.org/jira/browse/CXF-3861
             Project: CXF
          Issue Type: Improvement
          Components: JAX-RS
    Affects Versions: 2.4.3
            Reporter: Jason Chaffee


I would like to be able to force indent based on a query parameter so that we are not indenting
on every call, but only when we need to.  

For example,

http://localhost:8080/services/customer?indent=true

It would be nice if indent would accept (yes|y|true|on).

The code might look as follows for the JaxbElementProvider (not sure about Json).

In the marshal method:

        if (("on".equalsIgnoreCase(indent)) ||
                ("yes".equalsIgnoreCase(indent)) ||
                ("true".equalsIgnoreCase(indent))) {
            ms.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
        }




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message