我需要转换一个字符串如下:
{:old_id=>{:id=>"12345", :create_date=>Mon, 15 May 2023, :amount=>50.0}, :new_id=>{:id=>nil, :create_date=>"2023-05-15", :amount=>"50.00"}}
Python中的JSON字符串。
这似乎是一个Ruby哈希格式的对象,我没有看到一个直接的方法来解析它在Python中。
(to回答问题How to extract value from json in Snowflake)
1条答案
按热度按时间czq61nw11#
我们可以用一系列正则表达式来解决这个问题: