Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C5CAFB2A for ; Wed, 10 Apr 2013 10:01:30 +0000 (UTC) Received: (qmail 31606 invoked by uid 500); 10 Apr 2013 10:01:29 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 31272 invoked by uid 500); 10 Apr 2013 10:01:28 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 31252 invoked by uid 99); 10 Apr 2013 10:01:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 10:01:27 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mgainty@hotmail.com designates 65.55.116.98 as permitted sender) Received: from [65.55.116.98] (HELO blu0-omc3-s23.blu0.hotmail.com) (65.55.116.98) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 10:01:21 +0000 Received: from BLU172-W27 ([65.55.116.74]) by blu0-omc3-s23.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 10 Apr 2013 03:01:00 -0700 X-EIP: [prh8VNVJ98wyoLV0ymxXOV+Qgsv9AsrRgEiqHGvNXZ0=] X-Originating-Email: [mgainty@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="_8dd62b3f-9d2e-4838-ad68-bcf154fb55a9_" From: Martin Gainty To: Commons Users List Subject: RE: [LANG] How to escape JSON data Date: Wed, 10 Apr 2013 06:01:00 -0400 Importance: Normal In-Reply-To: References: , <5164B4C8.3000207@gmail.com>, MIME-Version: 1.0 X-OriginalArrivalTime: 10 Apr 2013 10:01:00.0579 (UTC) FILETIME=[4DD8EF30:01CE35D2] X-Virus-Checked: Checked by ClamAV on apache.org --_8dd62b3f-9d2e-4838-ad68-bcf154fb55a9_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable so in other words if the following Text is inputted by JQuery to JSON Parse= r =20 Martin O'Sullivan sends XYZ to Maurizio D'Milano=20 The JQuery-JSON Parse could possibly encode the tickmark embedded in the si= rnames incorrectly =20 what if we frontend all calls to JQuery.parse with a Json_Encoder which wou= ld encode=20 Martin O'Sullivan sends XYZ to the Maurizio D'Milano=20 as Martin O\u0027Sullivan sends XYZ to Maurizio D\u0027Milano conversely returning from JSON Parse the Json_Decoder would decode=20 Martin O\u0027Sullivan sends XYZ to Maurizio D\u0027Milano as Martin O'Sullivan sends XYZ to Maurizio D'Milano=20 ? Martin=20 ______________________________________________=20 Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . =20 > From: mcucchiara@apache.org > Date: Wed=2C 10 Apr 2013 11:37:44 +0200 > Subject: Re: [LANG] How to escape JSON data > To: user@commons.apache.org >=20 > Actually=2C when I was talking about the best way=2C I was asking for a > "common" way. >=20 > On 10 April 2013 02:39=2C Daniel Pitts wrote: > > I might suggest looking into the json.org library. > > > > > > On 4/9/13 7:36 AM=2C Maurizio Cucchiara wrote: > >> > >> OK=2C > >> there is already an opened issue [1] > >> > >> [1] https://issues.apache.org/jira/browse/LANG-797 > >> > >> Twitter :http://www.twitter.com/m_cucchiara > >> G+ :https://plus.google.com/107903711540963855921 > >> Linkedin :http://www.linkedin.com/in/mauriziocucchiara > >> VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=3Dmaurizio.cucch= iara > >> > >> Maurizio Cucchiara > >> > >> > >> On 9 April 2013 12:51=2C Maurizio Cucchiara wr= ote: > >>> > >>> Hi guys=2C > >>> what is the best way to escape json data? > >>> > >>> We (the Struts team) have been experiencing an issue [1] with the ECM= A > >>> Script translator (which=2C at first glance=2C could seem the right o= ne). > >>> > >>> It turned out that the Java translator which best fits to JSON=2C but= I > >>> don't think it's a good solution to use a translator designed for > >>> other needs. > >>> > >>> Should we define a custom translator? > >>> > >>> [1] https://issues.apache.org/jira/browse/WW-4041 > >>> > >>> > >>> Twitter :http://www.twitter.com/m_cucchiara > >>> G+ :https://plus.google.com/107903711540963855921 > >>> Linkedin :http://www.linkedin.com/in/mauriziocucchiara > >>> > >>> Maurizio Cucchiara > >> > >> --------------------------------------------------------------------- > >> To unsubscribe=2C e-mail: user-unsubscribe@commons.apache.org > >> For additional commands=2C e-mail: user-help@commons.apache.org > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe=2C e-mail: user-unsubscribe@commons.apache.org > > For additional commands=2C e-mail: user-help@commons.apache.org > > >=20 > --------------------------------------------------------------------- > To unsubscribe=2C e-mail: user-unsubscribe@commons.apache.org > For additional commands=2C e-mail: user-help@commons.apache.org >=20 = --_8dd62b3f-9d2e-4838-ad68-bcf154fb55a9_--