我有一个json对象
{
"timestamp": "2020-06-24T15:32:56.775518Z",
"record-type": "data",
"operation": "load",
"partition-key-type": "primary-key",
"schema-name": "legacy",
"table-name": "test"
}
我想把这些记录反序列化成
class MetadataModel(faust.Record):
timestamp: str
record-type: str # does not work, hyphens in name not allowed
schema_name: str # does not work
tableName: str # does not work
我可能遗漏了一些简单的东西,但是如何从键中带有连字符的json对象转到python对象呢。任何帮助都将不胜感激!
暂无答案!
目前还没有任何答案,快来回答吧!