I have a DTO interface which fetches data from different tables using joins. I have made a DTO interface with the abstract getter methods something like this.
public interface HRJobsDTO {
String getEditorName();
String getEditorId();
String getBillingMonth();
Integer getEditorWordCount();
Integer getJobCount();
Integer getEmployeeGrade();
Float getGrossPayableAmount();
Float getJobBillingRate();
Float getTaxDeduction();
Float getTaxDeductionAmount();
Float getNetPayableAmount();
String getInvoiceStatus();
String getFreelanceInvoiceId();
}
In this interface my getFreelanceInvoiceId(); method returns a JSON Array using json_arrayagg function of mysql. I changed the datatype to String, String[] and Arraylist but it returns something like this in my response
"freelanceInvoiceId": "[\"4af9e342-065b-4594-9f4f-a408d5db9819/2022121-95540\", \"4af9e342-065b-4594-9f4f-a408d5db9819/2022121-95540\", \"4af9e342-065b-4594-9f4f-a408d5db9819/20221215-53817\", \"4af9e342-065b-4594-9f4f-a408d5db9819/20221215-53817\", \"4af9e342-065b-4594-9f4f-a408d5db9819/20221215-53817\"]"
Is there any way to return only array with exclusion of backslashes?