Fix json serialization error
This commit is contained in:
parent
d9124434bb
commit
1d0f6e3b67
@ -1,4 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization.Metadata;
|
||||
using Newtonsoft.Json;
|
||||
using Raylib_cs;
|
||||
using JsonSerializer = System.Text.Json.JsonSerializer;
|
||||
@ -15,7 +16,8 @@ public class Tile
|
||||
|
||||
private static JsonSerializerOptions _jsonSerializerOptions = new()
|
||||
{
|
||||
WriteIndented = true
|
||||
WriteIndented = true,
|
||||
TypeInfoResolver = new DefaultJsonTypeInfoResolver()
|
||||
};
|
||||
|
||||
public static Tile GenerateTileFromJson(string jsonPath)
|
||||
|
@ -1,23 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishFileExclusionsFromSatelliteAssemblies>$(PublishFileExclusionsFromSatelliteAssemblies);data/**/*.*</PublishFileExclusionsFromSatelliteAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Raylib-cs" Version="6.1.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Raylib-cs" Version="6.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="data/**/*.*" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
<Content Include="data/**/*.*" CopyToOutputDirectory="Always" /> </ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="data\core\" />
|
||||
<Folder Include="data\core\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user