Beispiel #1
0
Datei: Jef.cs Projekt: Xorton/Jef
 static void outDataJson(string offset, JefData data)
 {
     if (data.type == JefType.Array)
         outArrayJson(offset, data);
     else if (data.type == JefType.Object)
         outObjectJson(offset, data);
     else if (data.type == JefType.Boolean)
         outFile.Write(data.bValue ? "true" : "false");
     else if (data.type == JefType.String)
         outFile.Write("\"" + data.sValue
                     .Replace("\\", "\\\\")
                     .Replace("\r\n", "\n")
                     .Replace("\n", "\\n")
                     .Replace("\b", "\\b")
                     .Replace("\f", "\\f")
                     .Replace("\t", "\\t")
                     .Replace("\"", "\\\"")
                     + "\"");
     else
         outFile.Write(data.SaveToString());
 }
Beispiel #2
0
Datei: Jef.cs Projekt: Xorton/Jef
 static void outData(string offset, JefData data)
 {
     if (data.type == JefType.Array)
         outArray(offset, data);
     else if (data.type == JefType.Object)
         outObject(offset, data);
     else
         outFile.Write(data.SaveToString());
 }