Last active
September 30, 2023 17:14
-
-
Save GiveMeSomething/0fb7805f540246ef8d429f0aa4e6a8aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text.Json; | |
namespace YourProject | |
{ | |
public class Json | |
{ | |
public static string Stringify<T>(T input) | |
{ | |
return JsonSerializer.Serialize<T>(input); | |
} | |
public static T? Deserialzie<T>(string input) | |
{ | |
return JsonSerializer.Deserialize<T>(input); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment