we ran into a problem with single tickmarks in Struts-user with JSON parse method..to wit; var json_parse = (function () { "use strict";
// This is a function that can parse a JSON text, producing a JavaScript // data structure. It is a simple, recursive descent parser. It does not use // eval or regular expressions, so it can be used as a model for implementing // a JSON parser in other languages. // We are defining the function inside of another function to avoid creating // global variables. var at, // The index of the current character ch, // The current character escapee = { '"': '"', '\\': '\\', '/': '/', b: '\b', f: '\f', n: '\n', r: '\r', t: '\t' }, text, error = function (m) { https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js notice that the code gleefully ignores tickmarks so we need to rewrite.. can someone poke the bear and get crockford to do this or should we enlist Mr Koch? ? Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité . Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Thu, 11 Apr 2013 09:32:10 +0200 > From: ebo...@apache.org > To: user@commons.apache.org > Subject: Re: [LANG] How to escape JSON data > > Le 11/04/2013 00:26, Daniel Pitts a écrit : > > Well, I'd be inclined to use the library written by the same people who > > maintain the spec: http://www.json.org/java/index.html > > If I'm not mistaken the "shall be used for Good, not Evil" clause is a > field of use restriction, that's not an open source license. > > http://debian.2.n7.nabble.com/The-Software-shall-be-used-for-Good-not-Evil-td1953402.html > > > Emmanuel Bourg > >