Author: chetanm
Date: Fri Aug 11 06:00:03 2017
New Revision: 1804751

URL: http://svn.apache.org/viewvc?rev=1804751&view=rev
Log:
OAK-6546 - JsonSerializer should taken an instance of JsopWriter

-- Switch to JsopWriter
-- Expose the constructor which takes a writer instance along with other params

Modified:
    
jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java

Modified: 
jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java?rev=1804751&r1=1804750&r2=1804751&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonSerializer.java
 Fri Aug 11 06:00:03 2017
@@ -37,6 +37,7 @@ import org.apache.jackrabbit.oak.api.Blo
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.commons.json.JsopTokenizer;
+import org.apache.jackrabbit.oak.commons.json.JsopWriter;
 import org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -50,7 +51,7 @@ public class JsonSerializer {
 
     private static final JsonFilter DEFAULT_FILTER = new 
JsonFilter(DEFAULT_FILTER_EXPRESSION);
 
-    private final JsopBuilder json;
+    private final JsopWriter json;
 
     private final int depth;
 
@@ -63,7 +64,7 @@ public class JsonSerializer {
     private final BlobSerializer blobs;
 
     private JsonSerializer(
-            JsopBuilder json, int depth, long offset, int maxChildNodes,
+            JsopWriter json, int depth, long offset, int maxChildNodes,
             JsonFilter filter, BlobSerializer blobs) {
         this.json = checkNotNull(json);
         this.depth = depth;
@@ -80,12 +81,19 @@ public class JsonSerializer {
                 new JsonFilter(filter), blobs);
     }
 
-    public JsonSerializer(JsopBuilder json, BlobSerializer blobs) {
+    public JsonSerializer(JsopWriter json,
+            int depth, long offset, int maxChildNodes,
+            String filter, BlobSerializer blobs) {
+        this(json, depth, offset, maxChildNodes,
+                new JsonFilter(filter), blobs);
+    }
+
+    public JsonSerializer(JsopWriter json, BlobSerializer blobs) {
         this(json, Integer.MAX_VALUE, 0, Integer.MAX_VALUE,
                 DEFAULT_FILTER, blobs);
     }
 
-    public JsonSerializer(JsopBuilder json, String filter, BlobSerializer 
blobs) {
+    public JsonSerializer(JsopWriter json, String filter, BlobSerializer 
blobs) {
         this(json, Integer.MAX_VALUE, 0, Integer.MAX_VALUE,
                 new JsonFilter(filter), blobs);
     }


Reply via email to