Define JSON serialization options on World
This commit is contained in:
parent
5ad57465d8
commit
31bd6a45cb
|
@ -1,3 +1,4 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MultiversalDiplomacy.Model;
|
||||
|
@ -7,6 +8,11 @@ namespace MultiversalDiplomacy.Model;
|
|||
/// </summary>
|
||||
public class World
|
||||
{
|
||||
public static readonly JsonSerializerOptions JsonOptions = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The map variant of the game.
|
||||
/// </summary>
|
||||
|
|
|
@ -9,9 +9,8 @@ namespace MultiversalDiplomacyTests;
|
|||
|
||||
public class SerializationTest
|
||||
{
|
||||
private JsonSerializerOptions Options = new() {
|
||||
private JsonSerializerOptions Options = new(World.JsonOptions) {
|
||||
WriteIndented = true,
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
};
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Reference in New Issue