Rizu/Rizu.Core/Models/TachiResponse.cs
Adele Reed 3ed7191acf Use System.Text.Json with BepInEx (#1)
When running via BepInEx, Unity's JsonUtility produces and reads empty documents.

As a bit of a hacky fix, this builds using System.Text.Json. granted, this pulls new deps in. All of the deps listed in the csproj will need to be included in the install package for BepInEx.

Reviewed-on: beerpsi/Rizu#1
Co-authored-by: Adele Reed <virepri2k@gmail.com>
Co-committed-by: Adele Reed <virepri2k@gmail.com>
2024-08-06 17:26:31 +00:00

19 lines
403 B
C#

using System;
#if BEPINEX // When we're building for BepInEx, the dummy JsonInclude is *not* defined, so let's cover that base.
using System.Text.Json.Serialization;
#endif
namespace Rizu.Core.Models;
[Serializable]
public class TachiResponse<T>
{
[JsonInclude]
public bool success;
[JsonInclude]
public string description;
[JsonInclude]
public T body;
}