I think it is a bug.

It has to be fixed in "XStreamRepresentation.write" method 

//below is the method code

    @Override
    public void write(Writer writer) throws IOException {
        if (representation != null) {
            representation.write(writer);
        } else if (object != null) {
            CharacterSet charSet = (getCharacterSet() == null) ?
CharacterSet.ISO_8859_1
                    : getCharacterSet();

            writer.append("<?xml version=\"1.0\" encoding=\""
                    + charSet.getName() + "\" ?>\n");
            getXstream().toXML(object, writer);
        }
    }

------------------------------

please check it, 

It writes xml header always, I think it should check mediaType and it
decide.




-- 
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/json-result-with-xml-header-tp5142059p5144803.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2617479

Reply via email to