fix: 解决json无法正常解析的问题

This commit is contained in:
2025-12-17 15:54:26 +08:00
parent 1dbcc03e46
commit 36296b6af4
5 changed files with 25 additions and 22 deletions

View File

@ -12,9 +12,10 @@ type ControlMessage struct {
}
type BroadcastMessage struct {
Type MessageType `json:"type"`
Topic Topic `json:"topic"`
Payload json.RawMessage `json:"payload"`
Type MessageType `json:"type"`
Topic Topic `json:"topic"`
Payload json.RawMessage `json:"payload"`
Timestamp int64 `json:"timestamp"`
}
func (m ControlMessage) Validate() error {