Return-Path: X-Original-To: apmail-struts-dev-archive@www.apache.org Delivered-To: apmail-struts-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A2DB6970 for ; Tue, 12 Jul 2011 11:45:10 +0000 (UTC) Received: (qmail 65829 invoked by uid 500); 12 Jul 2011 11:45:10 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 65789 invoked by uid 500); 12 Jul 2011 11:45:07 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 65781 invoked by uid 99); 12 Jul 2011 11:45:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jul 2011 11:45:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of grobmeier@gmail.com designates 209.85.216.169 as permitted sender) Received: from [209.85.216.169] (HELO mail-qy0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jul 2011 11:45:00 +0000 Received: by qyk32 with SMTP id 32so2333119qyk.14 for ; Tue, 12 Jul 2011 04:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=S5Eyg+6AVNMHOl/4yrUhGkYmQJaE4ZuLwgNz79O6uHE=; b=sxzSLFOAUQ7kXzDo3SmwXLqt6P75cAGrbj7zNYJjsjX9BAjg0IQ1xk8W43TNz8H6cv E1wbNzcofQFKyw5HQ9g6cIRidA+hd3GHjKvITPP8NqnrpnzscODfLYwXqr4XsJSkskVU Ov5DmqBoon0Z9ys8evUWsaalNTsfnO0lA7P2M= Received: by 10.229.106.69 with SMTP id w5mr4680966qco.41.1310471080100; Tue, 12 Jul 2011 04:44:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.51.130 with HTTP; Tue, 12 Jul 2011 04:44:20 -0700 (PDT) In-Reply-To: References: <4E187509.3080201@Newfield.org> <4E1911EF.5000603@Newfield.org> <4E19E3FC.5050006@Newfield.org> <4E1B92C6.10702@Newfield.org> From: Christian Grobmeier Date: Tue, 12 Jul 2011 13:44:20 +0200 Message-ID: Subject: Re: Comments in JSON To: Struts Developers List , lukasz.lenart@gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org > Thanks for all the comments and links, now I've got better overview > what's the real issue here. My idea was the same, to add some flag to > enable / disable comments in the output with default to true. I could not find the place but as this is not standard json the content type of the response header should not be "application/json". It should be something else like "application/struts-json" or similar. As I found out with a custom content type tools like jQuery might be able to add a Converter which is able to correct the invalid string: http://api.jquery.com/extending-ajax/#Converters At the moment the default is application/json which is wrong, when the enable comments option is true by default: http://svn.apache.org/repos/asf/struts/struts2/trunk/plugins/json/src/main/= java/org/apache/struts2/json/SerializationParams.java I have added a similar feature to my own struts json plugin and therefore I will implement such a converter. I will post the result (if i manage :-)) later Cheers, Christian > > I'm going to implement it till weekend, if not, Dale you're welcome to > do this as I'm going for short vacation. > > > Regards > -- > =C5=81ukasz > + 48 606 323 122=C2=A0http://www.lenart.org.pl/ > Warszawa JUG conference - Confitura http://confitura.pl/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > > --=20 http://www.grobmeier.de --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org