capture json

Hi All,

I am not able to capture json response as it is having some special characters.
how can i save it as i need to do corelation on this response.

Error : > j.j.JsonException: Syntax error! Invalid escape char: x
offset 1 (100.0%)
: 30120 near: “…-08-17T05\x3A53\x3A4…”

Below is the response:

{“controllerData”:{“MashupRefs”:{“MashupRef”:[{“mashupId”:“isf.shipment-pick.getShipmentDetails”,“Output”:{“Shipment”:{“Status”:{“Status”:“1100.70.06.10”,“Description”:“Ready For Backroom Pick”},“IsOverdue”:“true”,“DeliveryMethod”:“PICK”,“DocumentType”:“0001”,“ImageUrl”:“isf\x2Fresources\x2Fcss\x2Ficons\x2Fimages\x2FtimeOverdue.png”,“OrderNo”:“3100000240”,“Status_scattr”:“1100.70.06.10”,“DisplayOrderNo”:“3100000240”,“ShipmentNo”:“100000140”,“ShipmentKey”:“202108102030071344685”,“SLACssClass”:“time_overdue”,“ExpectedShipmentDate”:“2021-08-10T22\x3A30\x3A08\x2B00\x3A00”,"TimeRemaining":“Delayed by 3 d”,“SellerOrganizationCode”:“BAY”,“ShipNode”:“1101”,“OrderHeaderKey”:“202108102029241344371”,“EnterpriseCode”:“BAY”,“ImageAltText”:“Overdue”}},“mashupRefId”:""},{“mashupId”:“isf.shipment-pick.getAllPickableShipmentLineList”,“Output”:{“ShipmentLines”:{“TotalQuantity”:“1”,“ShipmentLine”:[{“OriginalQuantity”:“1”,“UnitOfMeasure”:“EACH”,“Shipment”:[{“Currency”:“CAD”,“EnterpriseCode”:“BAY”}],“DocumentType”:“0001”,“ImageURL”:“https\x3A\x2F\x2Fs7d9.scene7.com\x2Fis\x2Fimage\x2FTheBay\x2F\x2F0703113596452_main”,“Quantity”:“1”,“OrderNo”:“3100000240”,“Extn”:{“ExtnIsInternational”:“N”},“ItemID”:“90407099”,“ShipmentKey”:“202108102030071344685”,“ShipmentTagSerials”:{},“ShipmentLineKey”:“202108102030071344684”,“ShortageQty”:“0”,“ShipmentSubLineNo”:“0”,“OrderLine”:{“ItemDetails”:{“DisplayUnitOfMeasure”:“Each”,“UnitOfMeasure”:“EACH”,“AttributeList”:{“Attribute”:[{“Value”:“BLACK”,“Name”:“Color”},{“Value”:“One Size”,“Name”:“Size”}]},“Extn”:{“ExtnDivision”:“KITCHEN”,“ExtnVendorStyle”:“059645”,“ExtnClass”:“010”,“ExtnJewelryFlag”:“N”,“ExtnDepartment”:“636”,“ExtnDepartmentName”:“HOME”},“UOMDisplayFormat”:“formattedQty”,“ItemID”:“90407099”,“ClassificationCodes”:{“Model”:“0600090407099”},“InventoryParameters”:{“IsSerialTracked”:“N”},“AdditionalAttributeList”:{“AdditionalAttribute”:[{“Value”:“BLACK”,“Name”:“Color”},{“Value”:“One Size”,“Name”:“Size”}]},“ItemGroupCode”:“PROD”,“ItemAliasList”:{“ItemAlias”:[{“AliasValue”:“703113596452”,“AliasName”:“ACTIVE_UPC”}]},“Variation”:“BLACK \x7C One Size”,“PrimaryInformation”:{“Description”:“Dept NameHOME Class desc COUNTERTOP BLENDERS Brand Vitamix VITA-MIX,CORP. 059645 VITAMIX 6500 - BLACK”,“ManufacturerName”:“Vitamix”,“ImageID”:“0703113596452_main”,“ExtendedDisplayDescription”:“6500 Blender \x2890407099\x29”,“ImageLocation”:“https\x3A\x2F\x2Fs7d9.scene7.com\x2Fis\x2Fimage\x2FTheBay\x2F”}},“CarrierServiceCode”:"",“ItemGroupCode”:“PROD”,“IsBundleParent”:“N”},“OrderHeaderKey”:“202108102029241344371”,“ProductClass”:"",“Variation”:“BLACK \x7C One Size”,“ShipmentLineNo”:“1”,“BackroomPickedQuantity”:"",“OrderLineKey”:“202108102029241344372”}],“TotalNumberOfRecords”:“1”}},“mashupRefId”:""}]}}}

I am not able to capture json response as it is having some special characters.

Again, this statement is wrong.
This string is not valid JSON and those are not “special characters”, they are not properly escaped.
What happens is that you’re directly appending data encoded in hex instead of encoding in JSON.

The correct way to fix this would be to fix the API upstream.