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.
- Create a structure for each type we want to output.
- Fill the structure with the necessary details.
- Use
JsonSerializer.Serialize(Utf8JsonWriter, ...) to serialize this object.
- Use a json configuration with the following details:
kebab-case naming scheme
- use code generation
- enums as strings
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.
JsonSerializer.Serialize(Utf8JsonWriter, ...)to serialize this object.kebab-casenaming scheme