|
|
@ -24,17 +24,17 @@ namespace IPA.Config.Providers |
|
|
|
|
|
|
|
public Value Load(FileInfo file) |
|
|
|
{ |
|
|
|
if (!file.Exists) return Value.Null(); |
|
|
|
|
|
|
|
JToken jtok; |
|
|
|
using (var sreader = new StreamReader(file.OpenRead())) |
|
|
|
{ |
|
|
|
using var jreader = new JsonTextReader(sreader); |
|
|
|
jtok = JToken.ReadFrom(jreader); |
|
|
|
} |
|
|
|
|
|
|
|
if (!file.Exists) return Value.Null(); |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
JToken jtok; |
|
|
|
using (var sreader = new StreamReader(file.OpenRead())) |
|
|
|
{ |
|
|
|
using var jreader = new JsonTextReader(sreader); |
|
|
|
jtok = JToken.ReadFrom(jreader); |
|
|
|
} |
|
|
|
|
|
|
|
return VisitToValue(jtok); |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|