19 lines
No EOL
477 B
C#
19 lines
No EOL
477 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Foxcord.Serialization;
|
|
|
|
public static class JsonSerializerExtensions
|
|
{
|
|
public static JsonSerializerOptions CreateSerializer()
|
|
{
|
|
var opts = new JsonSerializerOptions
|
|
{
|
|
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower,
|
|
NumberHandling = JsonNumberHandling.AllowReadingFromString,
|
|
IncludeFields = true
|
|
};
|
|
|
|
return opts;
|
|
}
|
|
} |