vlc fully implemented
This commit is contained in:
@@ -20,11 +20,22 @@ public class Jason_Writer
|
||||
// Save one list of locJason objects to JSON file with given name
|
||||
public async Task SaveList(string listName, List<locJason> list)
|
||||
{
|
||||
Console.WriteLine($"Saving JSON list '{listName}' with {list.Count} items.");
|
||||
foreach (var item in list)
|
||||
{
|
||||
Console.WriteLine($" - Path: {item.path}, Type: {item.type}, ImageData length: {(item.imageData?.Length ?? 0)}");
|
||||
}
|
||||
|
||||
string filePath = Path.Combine(_folderPath, $"{listName}.json");
|
||||
string jsonString = JsonConvert.SerializeObject(list, Formatting.Indented);
|
||||
File.WriteAllText(filePath, jsonString);
|
||||
await File.WriteAllTextAsync(filePath, jsonString);
|
||||
|
||||
Console.WriteLine($"Saved JSON to: {filePath}");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Load one list of locJason objects from JSON file with given name
|
||||
public List<locJason> LoadList(string listName)
|
||||
{
|
||||
|
Reference in New Issue
Block a user