jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1133763 - /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonBuilder.java
Date Thu, 09 Jun 2011 10:02:45 GMT
Author: thomasm
Date: Thu Jun  9 10:02:45 2011
New Revision: 1133763

URL: http://svn.apache.org/viewvc?rev=1133763&view=rev
Log:
Fix string quoting.

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonBuilder.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonBuilder.java?rev=1133763&r1=1133762&r2=1133763&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonBuilder.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonBuilder.java
Thu Jun  9 10:02:45 2011
@@ -21,6 +21,7 @@ package org.apache.jackrabbit.spi2microk
 
 import java.io.IOException;
 import java.io.Writer;
+import org.apache.jackrabbit.mk.mem.JsopTokenizer;
 
 /**
  * Partially based on json-simple
@@ -46,7 +47,7 @@ public final class JsonBuilder {
             this.parent = parent;
             writer.write('{');
         }
-        
+
         public JsonObjectBuilder value(String key, String value) throws IOException {
             write(key, encode(value));
             return this;
@@ -297,7 +298,7 @@ public final class JsonBuilder {
     //------------------------------------------< private >---
 
     private static String quote(String string) {
-        return '"' + string + '"';
+        return JsopTokenizer.encode(string);
     }
 
     private static String encode(String value) {



Mime
View raw message