mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-10 23:44:43 +00:00
27 lines
717 B
C#
27 lines
717 B
C#
using System;
|
|
using System.IO;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace PckStudio.Classes.IO.Sounds
|
|
{
|
|
public class SoundIO
|
|
{
|
|
public Dictionary<string, Type> Read(string Filepath)
|
|
{
|
|
var jObj = (Newtonsoft.Json.Linq.JObject)JsonConvert.DeserializeObject(File.ReadAllText(Filepath));
|
|
var dict = JsonConvert.DeserializeObject<Dictionary<string, Type>>(jObj.ToString());
|
|
|
|
return dict;
|
|
}
|
|
|
|
public string Serialize(Dictionary<string, Type> input)
|
|
{
|
|
return JsonConvert.SerializeObject(input, Formatting.Indented);
|
|
}
|
|
}
|
|
}
|