-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timing points are cleared from beatmaps when parsed from JSON #15328
Comments
trying to fix this locally, i ended up just having the inner private lists get serialized/unserialized. i'm not sure if it's the best solution, but it was the least complex one //[JsonProperty]
[JsonIgnore]
public IReadOnlyList<TimingControlPoint> TimingPoints => timingPoints;
[JsonProperty]
private readonly SortedList<TimingControlPoint> timingPoints = // ... unfortunately, this doesn't seem to work on
|
that's incorrect, the concrete type (de)serialises just fine, just checked. the issue is the interface spec, newtonsoft doesn't know which implementation of |
yeah, that makes more sense. i just assumed |
Does the same solution not work for the |
yeah, that solution works for
doesn't look like applying
|
It can probably be made to work with a bit of refactoring. I believe the remaining issue is that you are trying to apply it to a |
Discussed in #15327
Originally posted by khang06 October 28, 2021
i'm not really sure if this is worth fixing since it doesn't look like beatmaps parsed from json are actually used anywhere right now, but it was affecting some stuff i was doing with them. the timing points are serialized fine, but don't get deserialized at all.
i suspect that this is because the fields that contain them in
ControlPointInfo
inheritIReadOnlyList
, so they can't be deserialized properlyThe text was updated successfully, but these errors were encountered: