@asher,如果只运行一次反序列化,可以显著提高性能。要收集姓名,您可以使用列表:
doc = json.loads(children.text) firstNames = [child["firstname"] for child in doc["children"]]