Skip to content

当mysql某个表的字段属性为json时,查出来的结果type为bytes,会报错TypeError: Type is not JSON serializable: bytes #5

@zlyir

Description

@zlyir

当mysql某个表的字段属性为json时,查出来的结果type为bytes,会报错TypeError: Type is not JSON serializable: bytes

File "/site-packages/mybatis/mybatis.py", line 194, in wrapper
self.cache.put(CacheKey(sql, param_list), res)
File "
/site-packages/mybatis/cache.py", line 44, in put
node = CacheNode(key, json.dumps(value))
^^^^^^^^^^^^^^^^^
TypeError: Type is not JSON serializable: bytes

这个是否可以兼容一下

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions