You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SeeNoEvil/SeeNoEvil/Tiled/TiledParser.cs

15 lines
444 B
C#

using System.IO;
using System.Text.Json;
namespace SeeNoEvil.Tiled {
public static class TiledParser {
public static TiledModel ReadMapJson(string fileName) {
StreamReader streamReader = File.OpenText(fileName);
string text = streamReader.ReadToEnd();
var options = new JsonSerializerOptions {
PropertyNameCaseInsensitive = true,
};
return JsonSerializer.Deserialize<TiledModel>(text, options);
}
}
}