You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (Resolved) (JIRA)" <ji...@apache.org> on 2011/12/29 14:35:31 UTC
[jira] [Resolved] (CXF-3861) Allow indentation of xml and json
based on query parameter
[ https://issues.apache.org/jira/browse/CXF-3861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-3861.
-----------------------------------
Resolution: Won't Fix
> 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