We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Error in processWebservicecom.fasterxml.jackson.core.JsonParseException: Unexpected character (')' (

srinath
Regular Contributor
Regular Contributor

I have disabled API for one of the application and when i verify on JSON validator the result is success but when i am using same JSON on saviynt giving error as below.

I am attaching JSON here

 

Error in processWebservicecom.fasterxml.jackson.core.JsonParseException: Unexpected character (')' (code 41)): was expecting comma to separate Object entries
at [Source: {"operation":"CREATE_OR_UPDATE","users":[{"properties":{"Upn":"MY14000607","EmployeeStatus":"Inactive")}}]}; line: 1, column: 104]
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error com.fasterxml.jackson.core.JsonParseException: Unexpected character (')' (code 41)): was expecting comma to separate Object entries
at [Source: {"operation":"CREATE_OR_UPDATE","users":[{"properties":{"Upn":"MY14000607","EmployeeStatus":"Inactive")}}]}; line: 1, column: 104]
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1702)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:558)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:456)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._skipComma(ReaderBasedJsonParser.java:2285)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextFieldName(ReaderBasedJsonParser.java:912)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.mapObject(UntypedObjectDeserializer.java:639)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.deserialize(UntypedObjectDeserializer.java:495)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.mapObject(UntypedObjectDeserializer.java:628)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.deserialize(UntypedObjectDeserializer.java:495)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.mapArray(UntypedObjectDeserializer.java:586)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.deserialize(UntypedObjectDeserializer.java:509)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:517)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:362)
2023-07-04 15:44:25,242 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger - Println :: | Error  at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:27)

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

{
"call": [
{
"name": "DisableAccountJSON",
"connection": "smallAuth",
"url": "https://xxx/rest/xxx/ums/managePersons",
"httpMethod": "POST",
"httpParams":"{\"operation\":\"CREATE_OR_UPDATE\",\"users\":[{\"properties\":{\"Upn\":\"${user.systemUserName}\",\"EmployeeStatus\":\"Inactive\"}}]}",
"httpHeaders": {
"Cookie": "${access_token}",
"Content-Type": "application/vnd.api+json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}


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

Sivagami
Valued Contributor
Valued Contributor

You have an extra parentheses in your json causing the json parser issue. Always before escaping the httpParams block key value pairs, check the syntax as the json parsers won't catch the issue with them.

Sivagami_0-1688494624088.png

-Siva

 

srinath
Regular Contributor
Regular Contributor

Yes, I removed initially and tried but it did not worked. however the error is about the parenthesis.  Now i have other issue and i am working on it.

Thanks @rushikeshvartak @Sivagami