I have created custom API and I am expecting following JSON format but I have received different format :
Looking your help to get the expected JSON (Extra character added in JSON, how to remove from the JSON to match the expected JSON)
Actual JSON format: Extra invalid character added in JSON
Expected JSON format:
ListEnumerator ListLineEnumerator = salesOrderList.getEnumerator();
while(ListLineEnumerator.moveNext())
{
salesOrderLineResonse = new XXX_SalesOrderLineResonse();
salesOrderLineResonse.parmOrderNum(salesOrderListContract.ParmSalesOrderList());
orderList.addEnd(salesOrderLineResonse);
}
salesOrderResponse = new XXX_salesOrderResponse();
salesOrderResponse.parmLine(orderList);
str jsonSerializedContractResponse = FormJsonSerializer::serializeClass(salesOrderResponse); // convert the object to JSON response