commit 539491775296f01d6a427fb7012b55a7f6689940
Author: @havlijan17 <havlijan@students.zcu.cz>
Date:   Wed Apr 15 19:31:17 2020 +0200

    #re#7831 Indetation OK, format OK

diff --git a/project/Deserializer/bcha.json b/project/Deserializer/bcha.json
index a6c6607..86cf9cf 100644
--- a/project/Deserializer/bcha.json
+++ b/project/Deserializer/bcha.json
@@ -4,10 +4,10 @@
 		"testInt" : 123, 
 		"intArray" : [ 5, 10, 15 ], 
 		"locInnerClassInstance" : {
-		class samples.ok.Inner : {
-			"vnitrni" : "INNER STRING AM I"
-		}
-}, 
+			class samples.ok.Inner : {
+				"vnitrni" : "INNER STRING AM I"
+			}
+		}, 
 		"localEnum" : LOW, 
 		"pozdrav" : "AHOJ", 
 		"stringArray" : [ "A", "B", "C" ]
diff --git a/project/Deserializer/src/Converter.java b/project/Deserializer/src/Converter.java
index c1c52b7..71fce7a 100644
--- a/project/Deserializer/src/Converter.java
+++ b/project/Deserializer/src/Converter.java
@@ -1,5 +1,9 @@
 import java.io.File;
+import java.io.FileDescriptor;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
 import java.util.List;
 
 import jdeserialize.content;
@@ -46,7 +50,12 @@ public class Converter extends Thread {
 		String json = "";
 		try {
 			System.out.println("Deserialization begins.");
+
+			//Redirectovany system.out do null streamu. Mozno redirect do souboru
+			System.setOut(new PrintStream(OutputStream.nullOutputStream()));
+			System.out.println("TEST STRING NOT SHOWING");
 			jdeserialize deserializer = new jdeserialize(buffer);
+			System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
 			
 			// gets the "contents" into an array - returnes the deserialization of all
             // 'writes' into serialized object via objectOutputStream
@@ -59,6 +68,10 @@ public class Converter extends Thread {
 			{
 				if(cnt != null)
 				{
+					//Parametrizovany toJson pomoci dictionary
+					//replace VS parametr
+					//Pustit 2X s parametrem nenabori vnitrni data (kde muzou byt html znacky)
+					//Ciste HTML / Cisty JSON
 					json += cnt.toJson("");
 				}
 			}
diff --git a/project/Deserializer/src/jdeserialize/instance.java b/project/Deserializer/src/jdeserialize/instance.java
index 3985cf4..5b828ac 100644
--- a/project/Deserializer/src/jdeserialize/instance.java
+++ b/project/Deserializer/src/jdeserialize/instance.java
@@ -30,9 +30,10 @@ public class instance extends contentbase {
     {
         StringBuffer sb = new StringBuffer();
         String val = "";
+        
+        indentation += "\t";
 
         /*if (classdesc.getType() == contenttype.CLASSDESC && !instance.indentedClasses.contains(classdesc.name)) {*/
-            indentation += "\t";
            /* instance.indentedClasses.add(classdesc.name);
         }*/
 
@@ -53,6 +54,8 @@ public class instance extends contentbase {
             //System.out.println(sb.toString());
         }
         sb.append(" : {"); // ending of first line
+        
+        indentation += "\t";
         //System.out.println(sb.toString());
 
         for (field f : classdesc.fields) {
@@ -70,7 +73,7 @@ public class instance extends contentbase {
                 val = locVal.toString();
             }
 
-            sb.append("\n\t").append(indentation);
+            sb.append("\n").append(indentation);
             sb.append("\"").append(f.name).append("\"");
             sb.append(" : ");
             sb.append(val);
@@ -81,12 +84,15 @@ public class instance extends contentbase {
                 //System.out.println(sb.toString());
             }
         }
+        indentation = indentation.substring(0, indentation.length() - 1);
 
-        sb.append("\n").append(indentation).append("}\n}");
+        sb.append("\n").append(indentation).append("}\n");
+        indentation = indentation.substring(0, indentation.length() - 1);
+        sb.append(indentation).append("}");
         //System.out.println(sb.toString());
 
         /*if (classdesc.getType() == contenttype.CLASSDESC && instance.indentedClasses.contains(classdesc.name)) {*/
-            indentation.replaceFirst("\t", "");
+        
             /*instance.indentedClasses.remove(classdesc.name);
         }*/
 
