Hi,
I’m new to bonita and JSON, I read a lot of posts on the forum but found no relevant infos on my problem.
I’m using a REST GET connector to fetch some infos from a webservice.
I have a process variable of HashMap type to witch I affect the result of the REST GET with “bodyAsObject”.
If I test the webservice (with postman chrome extension), the JSON looks like :
{
"organizations": [
{
"url": "https://xxx.zendesk.com/api/v2/organizations/7712313309.json",
"id": 7712313309,
"name": "xxx",
"shared_tickets": true,
"shared_comments": false,
"external_id": null,
"created_at": "2017-01-28T09:40:25Z",
"updated_at": "2017-02-20T09:14:34Z",
"domain_names": [
"xxx.ch"
],
"details": "",
"notes": "",
"group_id": null,
"tags": [],
"organization_fields": {}
}
],
"next_page": null,
"previous_page": null,
"count": 1
}
But if I display the process variable value in a text widget (for debug proposes), I have the following JSON :
{
"case_id": "57019",
"name": "zendeskTicketList",
"description": "",
"type": "java.util.HashMap",
"value": "{next_page=null, organizations=[{url=https://xxx.zendesk.com/api/v2/organizations/7712313309.json, id=7712313309, name=xxx, shared_tickets=true, shared_comments=false, external_id=null, created_at=2017-01-28T09:40:25Z, updated_at=2017-02-20T09:14:34Z, domain_names=[xxx.ch], details=, notes=, group_id=null, tags=[], organization_fields={}}], count=1, previous_page=null}"
}
The part I need is considered like a string.
Any ideas ?
Thanks in advance for your help