我正在使用
Marketo
marketo-rest-python
. 我可以创建潜在客户,也可以通过以下基本代码对其进行更新:
leads = [{"email":"joe@example.com","firstName":"Joe"},{"email":"jill@example.com","firstName":"Jill"}]
lead = mc.execute(method='create_update_leads', leads=leads, action='createOnly', lookupField='email',
asyncProcessing='false', partitionName='Default')
leads = []
lead = {}
lead['email'] = "joe@example.com"
lead['firstName'] = "Joe"
leads.append(lead)
lead = {}
lead['email'] = "jill@example.com"
lead['firstName'] = "Jill"
leads.append(lead)
json_leads = json.dumps(leads, separators=(',', ':'))
print(json_leads)
那么在微软Azure数据库中的输出是完全相同的,但是Marketo系统返回一个
609
->无效的JSON。
[{"email":"joe@example.com","firstName":"Joe"},{"email":"jill@example.com","firstName":"Jill"}]
与样品完全相同。当我使用示例JSON代码行时,它起作用,但我自己生成的JSON不起作用。
有人知道这会是什么吗?我在微软Azure数据库中使用Python。