mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-24 08:37:11 +02:00
misc: Cache LocalesJson when loading locale
This commit is contained in:
parent
ba199f4325
commit
77ef82d92a
2 changed files with 28 additions and 31 deletions
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
@ -27,9 +28,14 @@ namespace Ryujinx.Common.Utilities
|
|||
ReadCommentHandling = JsonCommentHandling.Skip
|
||||
};
|
||||
|
||||
public static string Serialize<T>(T value, JsonTypeInfo<T> typeInfo) => JsonSerializer.Serialize(value, typeInfo);
|
||||
public static string Serialize<T>(T value, JsonTypeInfo<T> typeInfo)
|
||||
=> JsonSerializer.Serialize(value, typeInfo);
|
||||
|
||||
public static T Deserialize<T>(string value, JsonTypeInfo<T> typeInfo) => JsonSerializer.Deserialize(value, typeInfo);
|
||||
public static T Deserialize<T>(string value, JsonTypeInfo<T> typeInfo)
|
||||
=> JsonSerializer.Deserialize(value, typeInfo);
|
||||
|
||||
public static T Deserialize<T>(ReadOnlySpan<byte> utf8Value, JsonTypeInfo<T> typeInfo)
|
||||
=> JsonSerializer.Deserialize<T>(utf8Value, typeInfo);
|
||||
|
||||
public static void SerializeToFile<T>(string filePath, T value, JsonTypeInfo<T> typeInfo)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue