You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

19 lines
314 B

import json
import typing
from dataclasses import dataclass
from dataclasses_json import dataclass_json
@dataclass_json
@dataclass
class Msg:
_from: str
cmd: str
values: typing.Any
def to_json_(self) -> str:
"""将数据类序列化为 JSON 字符串"""
return self.to_json()