LiveSplit / LiveSplit/LiveSplit

Incorrect AtomicDateTime serialization when serializing Attempt struct to JSON

Open
#2,307 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
1.9k
Forks
815
Avg merge
4d 17h
Merged PRs (30d)
3

Description

Came back to write some more unit tests and noticed the AtomicDateTime does not have a ToString() overload for when an Attempt struct is serialized to JSON, thus serializing to their type name. These methods might not be used right now and thus it might not have been caught still but are latent.

![image](https://user-images.githubusercontent.com/15602473/213953262-86203360-e08b-46c6-8718-c9143d7c5196.png)

My intention was to only add tests and refrain from fixing code problems so that the PR can be accepted without too much thinking, so I'm documenting this problem to come back and fix it once I PR the tests.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating AtomicDateTime, the Attempt struct, and the unit tests mentioned in the issue. Reproduce Attempt JSON serialization and confirm that AtomicDateTime emits its intended value rather than its type name; done when the behavior is covered by a passing test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.