Objetos de fondo:
public ActivityData (ID largo, String activityId, String activityName, String activityDesc, String activityPeriod, String activityPageUrl, String activityProds) { this.id = id; this.activityId = activityId; this.activityName = activityName; this.activityDesc = activityDesc; this.activityPeriod = activityPeriod; this.activityPageUrl = activityPageUrl; this.activityProds = activityProds; }
Este activityProds es un objeto de tipo Intermedio, y el valor pasado en este momento también debe ser de tipo String. Solución:
String str = "[\ n" + "{\" qstId \ ": \" 123 \ ", \ n" + "\" sku \ ": \" amani123 \ ", \ n" + "\" prodName \ " : \ "阿瑪尼 紅色 \" \ n "+ "}, \ n "+ " {\ n "+ " \ "qstId \": \ "123 \", \ n "+ " \ "sku \": \ " amani123 \ ", \ n" + "\" prodName \ ": \" 阿瑪尼 紅色 \ "} \ n" + "]"; JSONArray arr1 = JSONArray.parseArray (str); System.out.
El resultado es el siguiente:
"'[{\" qstId \ ": \" 123 \ ", \" prodName \ ": \" Armani Red \ ", \" sku \ ": \" amani123 \ "}, {\" qstId \ ": \ "123 \", \ "prodName \": \ "Armani Red \", \ "sku \": \ "amani123 \"}] '", agregue este valor como parámetro y pase