JSON import added
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user