Files
CarbonLib/GamsSets.cs
Francisco Salas bd98adc4cb
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
moved to logic from api to lib
2021-06-21 10:25:05 +02:00

24 lines
553 B
C#

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace FarmMapsAPI.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;
}
}
}