mirror of
https://gitea.tendokyu.moe/beerpsi/CHUNITHM-Patch-Finder.git
synced 2024-11-30 18:24:36 +01:00
18 lines
537 B
C#
18 lines
537 B
C#
|
using Newtonsoft.Json;
|
||
|
|
||
|
namespace CHUNITHM_Patch_Finder.Converters;
|
||
|
|
||
|
public class HexNumberJsonConverter : JsonConverter<int>
|
||
|
{
|
||
|
public override bool CanRead => false;
|
||
|
|
||
|
public override void WriteJson(JsonWriter writer, int value, JsonSerializer serializer)
|
||
|
{
|
||
|
writer.WriteRawValue($"0x{value:X2}");
|
||
|
}
|
||
|
|
||
|
public override int ReadJson(JsonReader reader, Type objectType, int existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||
|
{
|
||
|
throw new NotImplementedException();
|
||
|
}
|
||
|
}
|