将词典列表的字符串转换为实际词典列表

时间:2018-10-25 03:20:58

标签: python string

我在Python中有一个大字符串对象,该对象基本上只是字典列表(字典列表中)。有没有一种方法可以将字符串块转换为这些实际的Python对象。

例如,

  [{"name":"Offense","athletes":[{"name":"Josh Allen","href":"http://www.espn.com/nfl/player/_/id/3918298","id":"3918298","height":"6' 5\"","weight":"237 lbs","age":22,"position":"QB","jersey":"17","birthDate":"05/21/96","lastName":"Josh Allen","experience":"R","college":"Wyoming","birthPlace":"Firebaugh, CA"},{"name":"Derek Anderson","href":"http://www.espn.com/nfl/player/_/id/8627","id":"8627","height":"6' 6\"","weight":"235 lbs","age":35,"position":"QB","hand":"B","jersey":"3","birthDate":"06/15/83","lastName":"Derek Anderson","experience":14,"college":"Oregon State","birthPlace":"Portland, OR"}

0 个答案:

没有答案