diff --git i/lib/output.c w/lib/output.c
index 23b6a2c..5480de7 100644
--- i/lib/output.c
+++ w/lib/output.c
@@ -40,7 +40,7 @@ put_delimiter(grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type)
   case GRN_CONTENT_JSON:
     if (level < 2) { return; }
     GRN_TEXT_PUTC(ctx, outbuf, ((level & 3) == 3) ? ':' : ',');
-    if (DEPTH == 1 && ((level & 3) != 3)) { GRN_TEXT_PUTC(ctx, outbuf, '\n'); }
+    if (DEPTH == 1 && ((level & 3) == 1)) { GRN_TEXT_PUTC(ctx, outbuf, '\n'); }
     break;
   case GRN_CONTENT_XML:
     if (!DEPTH) { return; }
diff --git i/lib/proc.c w/lib/proc.c
index 03c41e4..cd7f406 100644
--- i/lib/proc.c
+++ w/lib/proc.c
@@ -1542,7 +1542,7 @@ dump_records(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table)
     if (i) { GRN_TEXT_PUTC(ctx, outbuf, ','); }
     GRN_BULK_REWIND(&column_name);
     grn_column_name_(ctx, column, &column_name);
-    grn_text_otoj(ctx, outbuf, &column_name, NULL);
+    grn_output_obj(ctx, outbuf, GRN_CONTENT_JSON, &column_name, NULL);
   }
   GRN_TEXT_PUTS(ctx, outbuf, "],\n");
 
@@ -1594,12 +1594,12 @@ dump_records(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table)
               GRN_OBJ_KEY_VAR_SIZE) {
             GRN_OBJ_INIT(&buf, GRN_VECTOR, 0, range);
             grn_obj_get_value(ctx, column, id, &buf);
-            grn_text_otoj(ctx, outbuf, &buf, NULL);
+            grn_output_obj(ctx, outbuf, GRN_CONTENT_JSON, &buf, NULL);
             grn_obj_unlink(ctx, &buf);
           } else {
             GRN_OBJ_INIT(&buf, GRN_UVECTOR, 0, range);
             grn_obj_get_value(ctx, column, id, &buf);
-            grn_text_otoj(ctx, outbuf, &buf, NULL);
+            grn_output_obj(ctx, outbuf, GRN_CONTENT_JSON, &buf, NULL);
             grn_obj_unlink(ctx, &buf);
           }
           break;
@@ -1607,7 +1607,7 @@ dump_records(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table)
           {
             GRN_OBJ_INIT(&buf, GRN_BULK, 0, range);
             grn_obj_get_value(ctx, column, id, &buf);
-            grn_text_otoj(ctx, outbuf, &buf, NULL);
+            grn_output_obj(ctx, outbuf, GRN_CONTENT_JSON, &buf, NULL);
             grn_obj_unlink(ctx, &buf);
           }
           break;
@@ -1628,7 +1628,7 @@ dump_records(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table)
           if (is_value_column) {
             buf.header.domain = ((grn_db_obj *)table)->range;
           }
-          grn_text_otoj(ctx, outbuf, &buf, NULL);
+          grn_output_obj(ctx, outbuf, GRN_CONTENT_JSON, &buf, NULL);
           grn_obj_unlink(ctx, &buf);
         }
         break;

