Author: coke
Date: Fri Oct 21 10:16:51 2005
New Revision: 9531

Modified:
   trunk/runtime/parrot/library/JSON.imc
Log:
JSON: at least *try* to escape strings.



Modified: trunk/runtime/parrot/library/JSON.imc
==============================================================================
--- trunk/runtime/parrot/library/JSON.imc       (original)
+++ trunk/runtime/parrot/library/JSON.imc       Fri Oct 21 10:16:51 2005
@@ -138,6 +138,10 @@ plain:
   .local string result
 
   $S0 = thing
+  .local pmc escaper
+  escaper = find_global "Data::Escape", "String"
+  $S0 = escaper($S0,'"')
+
   result = '"' . $S0
   result = result . '"'
 
@@ -317,6 +321,8 @@ done:
   .return (result)
 .end
 
+.include  "library/Data/Escape.imc"
+
 =head1 TODO
 
 =over 4

Reply via email to