我有一个json格式的响应数据,现在我想发布此json格式。但是我有同样的问题。
{'u_correlationid_': '','resolved_by': '','active': 'true','upon_approval': 'proceed','skills': '','parent_incident': '','business_impact': '','sys_domain': {'value': 'global','link': ''},'made_sla': 'true','activity_due': '2019-11-07 10:09:15','opened_at': '2019-09-11 16:17:24'}
当我尝试直接发布json数据时,出现错误:
"error": "Validation error - JSON parse error: Can not deserialize instance of java.lang.String out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.JsonmappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@37b90445; line: 1,column: 298] (through reference chain: java.util.LinkedHashMap[\"sys_domain\"])"
我想用Python修复此错误,并且还以"
而不是'
格式发布我的json数据
例如-{"u_correlationid":""}
,最后我还想在发布之前将一个密钥对附加到现有密钥对上。
例如-
{"u_correlationid":"","opened_at": "2019-09-11 16:17:24","data":"big"}