fixing xml quoting issues
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 11 Mar 2005 23:46:03 +0000 (23:46 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 11 Mar 2005 23:46:03 +0000 (23:46 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@217 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/JSON.pm

index 2fd01f4..1893cdf 100644 (file)
@@ -93,7 +93,8 @@ sub JSON2perl {
        my @strings = /"((?:(?:\\[\"])|[^\"])*)"/sog;
 
        # Replace with code...
-       s/"(?:(?:\\[\"])|[^\"])*"/ shift(\@strings) /sog;
+       #s/"(?:(?:\\[\"])|[^\"])*"/ do{ \$t = '"'.shift(\@strings).'"'; eval \$t;} /sog;
+       s/"(?:(?:\\[\"])|[^\"]*)"/ eval { shift(\@strings) } /sog;
 
        # Perlify hash notation
        s/:/ => /sog;