mirror of
https://git.steelants.cz/JonatanRek/FakeDeck.git
synced 2026-10-11 17:24:37 +00:00
Progression And Cleanup
This commit is contained in:
1 parent
012cc02352
commit
0918ac5a80
6 files changed
+181
-22
No files matched your search
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace FakeeDeck.Class
|
||||
{
|
||||
internal class YamlHelper
|
||||
{
|
||||
JsonDocument jsonObjecz;
|
||||
public YamlHelper()
|
||||
{
|
||||
var r = new StreamReader("./configuration.yaml");
|
||||
var deserializer = new Deserializer();
|
||||
object yamlObject = deserializer.Deserialize(r);
|
||||
string json = System.Text.Json.JsonSerializer.Serialize(yamlObject);
|
||||
jsonObjecz = JsonDocument.Parse(json);
|
||||
}
|
||||
|
||||
public JsonElement getData()
|
||||
{
|
||||
return jsonObjecz.RootElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user