mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 04:13:40 +01:00
Fix SeString serialization/deserialization (#840)
* chore: add SeString JSON conversion test * fix: SeString JSON serialization * chore: add SeString JSON deserialization test * chore: rename tests to abstract format away * chore: fix typos * fix: deserializable SeStrings * chore: add comment to test * chore: use DeserializeConfig in Load
This commit is contained in:
parent
6dcddb1f29
commit
387a820392
3 changed files with 104 additions and 14 deletions
|
|
@ -5,6 +5,7 @@ using System.IO;
|
|||
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
|
||||
// TODOs:
|
||||
|
|
@ -29,6 +30,7 @@ namespace Dalamud.Game.Text.SeStringHandling
|
|||
/// <summary>
|
||||
/// Gets the Lumina instance to use for any necessary data lookups.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public DataManager DataResolver => Service<DataManager>.Get();
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -231,13 +233,13 @@ namespace Dalamud.Game.Text.SeStringHandling
|
|||
/// <summary>
|
||||
/// The start byte of a payload.
|
||||
/// </summary>
|
||||
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "This is prefered.")]
|
||||
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "This is preferred.")]
|
||||
protected const byte START_BYTE = 0x02;
|
||||
|
||||
/// <summary>
|
||||
/// The end byte of a payload.
|
||||
/// </summary>
|
||||
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "This is prefered.")]
|
||||
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "This is preferred.")]
|
||||
protected const byte END_BYTE = 0x03;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue