JSON import added

This commit is contained in:
retr0volkov
2025-07-10 11:29:19 +03:00 Unverified
parent fe8bfe7ef0
commit 7a34fc2dbb
7 changed files with 60 additions and 9 deletions
+3 -2
View File
@@ -13,7 +13,8 @@ public static class DataSerialization
private static string LoadData(string path)
{
return System.IO.File.ReadAllText(path);
string text = System.IO.File.ReadAllText(path);
return text;
}
public static void SavePoint(Point point, string path)
@@ -41,7 +42,7 @@ public static class Deserialization
{
try
{
return string.IsNullOrEmpty(point) ? JsonSerializer.Deserialize<Point>(point) : null;
return !string.IsNullOrEmpty(point) ? JsonSerializer.Deserialize<Point>(point) : null;
}
catch
{