We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d077c68 + 2673a93 commit 879328cCopy full SHA for 879328c
CustomCommands/Services/LoadJson.cs
@@ -1,3 +1,4 @@
1
+using System.Text;
2
using System.Text.Json;
3
using CustomCommands.Interfaces;
4
using CustomCommands.Model;
@@ -48,7 +49,11 @@ public List<Commands> GetCommandsFromJsonFiles(string path)
48
49
50
foreach (var file in files)
51
{
- var json = File.ReadAllText(file);
52
+ string json;
53
+
54
+ // Read Unicode Characters
55
+ using (StreamReader sr = new StreamReader(file, Encoding.UTF8))
56
+ json = sr.ReadToEnd();
57
58
// Validate the JSON file
59
if (!IsValidJsonSyntax(file))
0 commit comments