Garados007 / Garados007/Werewolf

Refactor game event json serialization

Open
#38 0 comments 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
C#
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Currently, is all the serialization stuff hardcoded for each event handler method. It would be better and easier for future maintenance, if those is replaced with auto conversion.

1. Create a structure for each type we want to output.
2. Fill the structure with the necessary details.
3. Use `JsonSerializer.Serialize(Utf8JsonWriter, ...)` to serialize this object.
4. Use a json configuration with the following details:
- `kebab-case` naming scheme
- use code generation
- enums as strings

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.