1
0
mirror of synced 2024-11-24 04:20:10 +01:00

fixed escaped characters (for real)

This commit is contained in:
NotImplementedLife 2023-07-22 08:21:29 +03:00
parent e793cc6c10
commit 29f182513f
6 changed files with 31 additions and 3 deletions

View File

@ -16,5 +16,13 @@ namespace TaikoSoundEditor.Data
[ReadOnly(true)] [ReadOnly(true)]
[JsonPropertyName("uniqueId")] public int UniqueId { get; set; } = 0; [JsonPropertyName("uniqueId")] public int UniqueId { get; set; } = 0;
[JsonPropertyName("closeDispType")] public int CloseDispType { get; set; } = 0; [JsonPropertyName("closeDispType")] public int CloseDispType { get; set; } = 0;
[DefaultValue(Genre.Pop)]
[JsonIgnore] public Genre Genre
{
get => (Genre)GenreNo;
set => GenreNo = (int)value;
}
} }
} }

14
Genres.cs Normal file
View File

@ -0,0 +1,14 @@
namespace TaikoSoundEditor
{
public enum Genre
{
Pop=0,
Anime=1,
Kids=2,
Vocaloid=3,
GameMusic=4,
NamcoOriginal=5,
Variety=7,
Classical=8
}
}

View File

@ -458,9 +458,15 @@ namespace TaikoSoundEditor
private string JsonFix(string json) private string JsonFix(string json)
{ {
var specialChars = "!@#$%^&*()_+=`~[]{}<>\\/'";
foreach(var c in specialChars)
{
json = json.Replace($"\\u00{((int)c):X2}", $"{c}");
}
return json return json
.Replace("\u0022 ", "\\\"") .Replace("\\u0022", "\\\"")
.Replace("\u0026 ", "\\&")
.Replace("\r\n ", "\r\n\t\t") .Replace("\r\n ", "\r\n\t\t")
.Replace("\r\n ", "\r\n\t\t") .Replace("\r\n ", "\r\n\t\t")
.Replace("{\r\n \"items\": [", "{\"items\":[") .Replace("{\r\n \"items\": [", "{\"items\":[")

View File

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<History>True|2023-07-21T16:41:13.2800435Z;True|2023-07-19T13:08:33.4726289+03:00;True|2023-07-19T12:08:17.2430335+03:00;True|2023-07-18T09:38:50.7615921+03:00;True|2023-07-18T09:25:23.0403589+03:00;True|2023-07-17T17:57:08.1469738+03:00;True|2023-07-17T11:28:41.9554245+03:00;True|2023-07-17T11:15:26.2194507+03:00;</History> <History>True|2023-07-21T17:03:15.6598520Z;True|2023-07-21T19:41:13.2800435+03:00;True|2023-07-19T13:08:33.4726289+03:00;True|2023-07-19T12:08:17.2430335+03:00;True|2023-07-18T09:38:50.7615921+03:00;True|2023-07-18T09:25:23.0403589+03:00;True|2023-07-17T17:57:08.1469738+03:00;True|2023-07-17T11:28:41.9554245+03:00;True|2023-07-17T11:15:26.2194507+03:00;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>

BIN
Tools/tja2fumen-old.exe Normal file

Binary file not shown.

Binary file not shown.