Files
CarbonLib/CarbonLib/GamsSets.cs
Francisco Salas 0e8be57d43
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
aw7152: namespace change
2025-12-09 13:41:19 +01:00

24 lines
551 B
C#

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace CarbonLib.Carbon
{
public class GamsSets
{
public static T ReadSets<T>(string jsonFile)
{
T data;
using (StreamReader r = new StreamReader(jsonFile))
{
string json = r.ReadToEnd();
data = JsonConvert.DeserializeObject<T>(json);
}
return data;
}
}
}