mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
32 lines
852 B
C#
32 lines
852 B
C#
// ReSharper disable InconsistentNaming
|
|
// ReSharper disable CollectionNeverUpdated.Global
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Net
|
|
{
|
|
public static class Json
|
|
{
|
|
public static VersionList ReadVersionList(string filename)
|
|
{
|
|
var text = File.ReadAllText(filename);
|
|
var versionList = JsonConvert.DeserializeObject<VersionList>(text);
|
|
return versionList;
|
|
}
|
|
}
|
|
|
|
public class VersionList
|
|
{
|
|
public List<VersionListTitle> titles { get; set; }
|
|
public int format_version { get; set; }
|
|
public long last_modified { get; set; }
|
|
}
|
|
|
|
public class VersionListTitle
|
|
{
|
|
public string id { get; set; }
|
|
public int version { get; set; }
|
|
public int required_version { get; set; }
|
|
}
|
|
}
|