added newlines after commas in pretty_print
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 11 Mar 2005 16:38:22 +0000 (16:38 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 11 Mar 2005 16:38:22 +0000 (16:38 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@212 9efc2488-bf62-4759-914b-345cdb29e865

src/srfsh/srfsh.c

index 1707992..372fffc 100644 (file)
@@ -550,7 +550,21 @@ char* json_printer( json* object ) {
                        buffer_add( buf, tab ); 
                        free(tab);
 
+               } else if( string[i] == ',' ) {
+
+//                     tab_var--;
+//                     buffer_add(buf, "\n");
+                       buffer_add( buf, ",");
+                       buffer_add( buf, "\n" );        
+                       char* tab = tabs(tab_var);
+                       buffer_add(buf, tab);
+                       free(tab);
+//                     tab = tabs(tab_var);
+//                     buffer_add( buf, tab ); 
+//                     free(tab);
+
                } else {
+
                        char b[2];
                        b[0] = string[i];
                        b[1] = '\0';