There python json string type digital int (without the quotes)

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

  

Guess you like

Origin www.cnblogs.com/mahailuo/p/11286803.html