I have a process which takes array and json as input and we use Django python to invoke the process.
The REST request is as below which works fine when tested via Postman,
{
“variables”: {
“environments”:{
“value”: “["dev","test"]”,
“type”:“object”,
“valueInfo”: {
“objectTypeName”: “java.util.ArrayList”,
“serializationDataFormat”: “application/json”
}
},
“businessOwner”: {
“value”: “{"email":"cool.o’brien@example.com", "userId":"cooldev"}”,
“type”: “json”
}
},
“businessKey” : “150”
}
When the above request is created in python , after json.dumps(payload) adds additional \ which causes the process execution failure
org.camunda.bpm.engine.ProcessEngineException: Cannot deserialize object in variable ‘businessOwner’: SPIN/JACKSON-JSON-01001
Unable to parse input into json node
The result of python json.dumps is as below
{“variables”: {“environments”: {“value”: “[\"development\",\"test\"]”, “type”: “object”, “valueInfo”: {“objectTypeName”: “java.util.ArrayList”, “serializationDataFormat”: “application/json”}}, “businessOwner”: {“value”: “{\"email\":\"cool.o’brien@example.com\",\"userId\":\"cooldev\"}”, “type”: “json”}}, “businessKey”: “100”}
Are there any python client for Camunda which handles “objectTypeName”: “java.util.ArrayList”, and “type”: “json” and takes care of escaping?