Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Json parse error

Karthik
New Contributor II
New Contributor II

Team,

 

we are getting below error while processing the request

 

{"Roles":{"message":"Unexpected character ('d' (code 100)): was expecting comma to separate Object entries\n at [Source: {\"client_id\": \"XXX\",\"client_secret\":\"XXX\",\"data\":\"{'+\"date\"+': \"2024-05-15\",\"roles\": [{\"rolecode\":\"Channel  Approver - Private\",\"roleoper\": \"insert\",\"users\": [{\"email\":\"yuhan.mao@xxx.com\",\"521id\":\"XXX\",\"deptcode\":\"IT - Project Manager \",\"useroper\": \"insert\"}]}],\"depts\":[{\"deptcode\":\"IT - Project Manager \",\"deptoper\":\"insert\"}]}\"}; line: 1, column: 146]","status":"Failed"}}

Problem: With single quotes it worked in V24.2 version but failing in V23.5 but after replace with " in V23.5 we are getting above error.

Please suggest

 

__PRESENT

3 REPLIES 3

naveenss
All-Star
All-Star

Hi @Karthik please share the JSON you are using. 

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Karthik
New Contributor II
New Contributor II

Hi @naveenss 

We are getting @Error @ \"data\":\\\"{\\\"date\\\" in below json

 

{
"call":
[

 

{
"name": "Roles",
"connection": "acctAuth",
"url": "xxx",
"httpMethod": "POST",
"httpParams":"{\"client_id\":\"xxx\",\"client_secret\":\"xxx\",\"data\":\\\"{\\\"date\\\":\\\"${Calendar.getInstance(TimeZone.getTimeZone('UTC')).format('yyyy-MM-dd')}\\\",\\\"roles\\\": [{\\\"rolecode\\\":\\\"${entitlementValue.entitlement_value}\\\",\\\"roleoper\\\": \\\"insert\\\",\\\"users\\\": [{\\\"email\\\":\\\"${user.email}\\\",\\\"521id\\\":\\\"${user.systemUserName}\\\",\\\"deptcode\\\":\\\"${user.departmentname}\\\",\\\"useroper\\\": \\\"insert\\\"}]}],\\\"depts\\\":[{\\\"deptcode\\\":\\\"${user.departmentname}\\\",\\\"deptoper\\\":\\\"insert\\\"}]}\\\"}",
"httpHeaders": {
},
"httpContentType": "application/json",
"successResponses":
{
"statusCode": [200,201,204]
},
"unsuccessResponses":
{
"statusCode": [400,401,404,500]
}
}

]
}

 

 

If its working with higher version then it can't be fixed. use v24.x


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.