Skip to content

Instantly share code, notes, and snippets.

@GiveMeSomething
Last active September 30, 2023 17:14
Show Gist options
  • Save GiveMeSomething/0fb7805f540246ef8d429f0aa4e6a8aa to your computer and use it in GitHub Desktop.
Save GiveMeSomething/0fb7805f540246ef8d429f0aa4e6a8aa to your computer and use it in GitHub Desktop.
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