mirror of
https://github.com/Tribufu/TribufuDotNet
synced 2026-08-09 12:51:06 +00:00
Migrate to new tribufu project structure (#2)
* Migrate to new tribufu project structure * Update .gitignore * Remove old api files * Update Directory.Build.props * Rename solution
This commit is contained in:
parent
be25ee8fe3
commit
7e8e192dc3
115 changed files with 41 additions and 262 deletions
|
|
@ -1,35 +0,0 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace Tribufu.Serialization
|
||||
{
|
||||
public static class CustomSerializerSettings
|
||||
{
|
||||
public static JsonSerializerSettings GetNewtonsoftJson()
|
||||
{
|
||||
var settings = new JsonSerializerSettings();
|
||||
SetNewtonsoftJson(settings);
|
||||
return settings;
|
||||
}
|
||||
|
||||
public static void SetNewtonsoftJson(JsonSerializerSettings settings)
|
||||
{
|
||||
settings.ContractResolver = new BaseClassFirstContractResolver
|
||||
{
|
||||
NamingStrategy = new SnakeCaseNamingStrategy()
|
||||
};
|
||||
|
||||
settings.Converters.Add(new DecimalNullableStringConverter());
|
||||
settings.Converters.Add(new DecimalStringConverter());
|
||||
settings.Converters.Add(new ULongNullableStringConverter());
|
||||
settings.Converters.Add(new ULongStringConverter());
|
||||
settings.Converters.Add(new StringEnumConverter(new SnakeCaseNamingStrategy(), false));
|
||||
|
||||
settings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue