python json字符串中有int类型数字(不带引号)

def jsonfy(s:str)->object:
    obj = eval(s, type('js', (dict,), dict(__getitem__=lambda s, n: n))())
    return obj

  

猜你喜欢

转载自www.cnblogs.com/mahailuo/p/11286803.html