无法将字符串Json解析为Json对象

费萨尔·穆罕默德(Faisal Mohammad)

我有json值[“ SelectedRoute”],它是json的字符串。其中双引号替换为\“

"SelectedRoute": "{\"bounds\":{\"northeast\":{\"lat\":23.8762034,\"lng\":90.4259529},\"southwest\":{\"lat\":23.7500263,\"lng\":90.3785006}},\"copyrights\":\"Map data ©2018 Google\",\"legs\":[{\"distance\":{\"text\":\"21.5 km\",\"value\":21509},\"duration\":{\"text\":\"1 hour 0 mins\",\"value\":3600},\"end_address\":\"Rd No 17B, Dhaka 1230, Bangladesh\",\"end_location\":{\"lat\":23.8758733,\"lng\":90.379545499999992},\"start_address\":\"13 Kazi Nazrul Islam Ave, Dhaka 1215, Bangladesh\",\"start_location\":{\"lat\":23.7509919,\"lng\":90.3929052},\"steps\":[{\"distance\":{\"text\":\"0.1 km\",\"value\":116},\"duration\":{\"text\":\"1 min\",\"value\":46},\"end_location\":{\"lat\":23.7500263,\"lng\":90.3933254},\"html_instructions\":\"Head <b>south</b>\",\"polyline\":{\"points\":\"uz}[email protected]\"},\"start_location\":{\"lat\":23.7509919,\"lng\":90.3929052},\"travel_mode\":\"DRIVING\",\"maneuver\":null},{\"distance\":{\"text\":\"0.8 km\",\"value\":848},\"duration\":{\"text\":\"4 mins\",\"value\":231},\"end_location\":{\"lat\":23.753581,\"lng\":90.4005655},\"html_instructions\":\"At the roundabout, take the <b>1st</b> exit onto <b>Panthapath Tejgaon link Rd</b>\",\"polyline\":{\"points\":\"ut}oCi}[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]}[email protected]\"},\"start_location\":{\"lat\":23.7500263,\"lng\":90.3933254},\"travel_mode\":\"DRIVING\",\"maneuver\":\"roundabout-left\"},{\"distance\":{\"text\":\"0.4 km\",\"value\":404},\"duration\":{\"text\":\"1 min\",\"value\":57},\"end_location\":{\"lat\":23.7568788,\"lng\":90.3989307},\"html_instructions\":\"Turn <b>left</b> onto <b>Moghbazar Rd</b>/<b>Shaheed Tajuddin Ahmed Ave</b>\",\"polyline\":{\"points\":\"{[email protected]@[email protected][email protected]@[email protected][[email protected]\"},\"start_location\":{\"lat\":23.753581,\"lng\":90.4005655},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-left\"},{\"distance\":{\"text\":\"0.3 km\",\"value\":337},\"duration\":{\"text\":\"2 mins\",\"value\":95},\"end_location\":{\"lat\":23.7558643,\"lng\":90.4018631},\"html_instructions\":\"Sharp <b>right</b> onto <b>Hatir Jheel Link Rd</b>\",\"polyline\":{\"points\":\"o__pCi`[email protected]?HOFIBIDIDODQP}@[email protected]@[email protected]@\"},\"start_location\":{\"lat\":23.7568788,\"lng\":90.3989307},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-sharp-right\"},{\"distance\":{\"text\":\"0.2 km\",\"value\":161},\"duration\":{\"text\":\"1 min\",\"value\":25},\"end_location\":{\"lat\":23.7567087,\"lng\":90.4030281},\"html_instructions\":\"At the roundabout, take the <b>1st</b> exit and stay on <b>Hatir Jheel Link Rd</b>\",\"polyline\":{\"points\":\"cy~oCsrwf[email protected][email protected]?AOMIIKIEIGIIOIOK[GOGQCICECCCAEEEAIESG\"},\"start_location\":{\"lat\":23.7558643,\"lng\":90.4018631},\"travel_mode\":\"DRIVING\",\"maneuver\":\"roundabout-left\"},{\"distance\":{\"text\":\"1.1 km\",\"value\":1119},\"duration\":{\"text\":\"2 mins\",\"value\":112},\"end_location\":{\"lat\":23.7640589,\"lng\":90.410230800000008},\"html_instructions\":\"Keep <b>left</b> to stay on <b>Hatir Jheel Link Rd</b>\",\"polyline\":{\"points\":\"m~~oC}[email protected]}@[email protected]@MYM][email protected]@[email protected]@[email protected]{@[email protected]@[email protected]@[email protected]][email protected]]OQWW{[email protected]@GG[[email protected]@AAuA_AeA}@[email protected]@\"},\"start_location\":{\"lat\":23.7567087,\"lng\":90.4030281},\"travel_mode\":\"DRIVING\",\"maneuver\":\"keep-left\"},{\"distance\":{\"text\":\"1.3 km\",\"value\":1262},\"duration\":{\"text\":\"3 mins\",\"value\":162},\"end_location\":{\"lat\":23.7710032,\"lng\":90.412744400000008},\"html_instructions\":\"Continue straight\",\"polyline\":{\"points\":\"kl`pC}[email protected][[email protected]@USGWI{@[email protected]@[email protected][email protected]@KV][email protected]@[email protected]@[email protected]@[email protected]?K?MAKAICCAQKMIKKOQQUEMGQEMC[C][email protected][email protected]@[email protected]@@[email protected]][email protected]@[email protected]@A\"},\"start_location\":{\"lat\":23.7640589,\"lng\":90.410230800000008},\"travel_mode\":\"DRIVING\",\"maneuver\":\"straight\"},{\"distance\":{\"text\":\"0.4 km\",\"value\":375},\"duration\":{\"text\":\"1 min\",\"value\":59},\"end_location\":{\"lat\":23.7726206,\"lng\":90.415847},\"html_instructions\":\"Slight <b>right</b> onto <b>Hatir Jheel Link Rd 5</b>\",\"polyline\":{\"points\":\"wwapCsvyfPCWKAMEQGSQMKKKGIIO][email protected][{@[email protected]{A]iA{@gCGYEUESC]\"},\"start_location\":{\"lat\":23.7710032,\"lng\":90.412744400000008},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-slight-right\"},{\"distance\":{\"text\":\"0.4 km\",\"value\":366},\"duration\":{\"text\":\"1 min\",\"value\":57},\"end_location\":{\"lat\":23.771775,\"lng\":90.4185292},\"html_instructions\":\"<b>Hatir Jheel Link Rd 5</b> turns slightly <b>right</b> and becomes <b>Hatir Jheel Link Rd</b>\",\"polyline\":{\"points\":\"{[email protected]@[email protected][email protected]@^K\"},\"start_location\":{\"lat\":23.7726206,\"lng\":90.415847},\"travel_mode\":\"DRIVING\",\"maneuver\":null},{\"distance\":{\"text\":\"0.6 km\",\"value\":639},\"duration\":{\"text\":\"2 mins\",\"value\":90},\"end_location\":{\"lat\":23.7702073,\"lng\":90.4236367},\"html_instructions\":\"Keep <b>right</b> to continue on <b>হাতির ঝিল সংযোগ সড়ক</b>\",\"polyline\":{\"points\":\"s|apCyzzfP\\\\GTGHEFEDEHGV]^[email protected]@B]@[email protected][email protected]@EWI[GMGKGIECKGKGECGGGGEEGSCK?M?KDUBKDMHK`[email protected]@[email protected]@[email protected][email protected]@@IBS?S\"},\"start_location\":{\"lat\":23.771775,\"lng\":90.4185292},\"travel_mode\":\"DRIVING\",\"maneuver\":\"keep-right\"},{\"distance\":{\"text\":\"3.2 km\",\"value\":3190},\"duration\":{\"text\":\"13 mins\",\"value\":766},\"end_location\":{\"lat\":23.7976518,\"lng\":90.423476},\"html_instructions\":\"At the roundabout, take the <b>1st</b> exit onto <b>Bir Uttam Rafiqul Islam Ave</b>\",\"polyline\":{\"points\":\"yrapCwz{[email protected][email protected][email protected]@[email protected]}@[email protected]@GC}[email protected]][email protected]@[email protected]@@[email protected][@[email protected][H][email protected][@[email protected]@[email protected]@[email protected]@[email protected][[email protected][[email protected][A}@[email protected]@AmBG}@@[email protected][email protected]@[email protected]@gAL}[email protected]{D`@[email protected]@[email protected]@\"},\"start_location\":{\"lat\":23.7702073,\"lng\":90.4236367},\"travel_mode\":\"DRIVING\",\"maneuver\":\"roundabout-left\"},{\"distance\":{\"text\":\"3.2 km\",\"value\":3210},\"duration\":{\"text\":\"9 mins\",\"value\":541},\"end_location\":{\"lat\":23.8256119,\"lng\":90.4215735},\"html_instructions\":\"Continue onto <b>Progati Sarani Rd</b>\",\"polyline\":{\"points\":\"i~fpCwy{fPSB}[email protected]{QtBcIpA}@JyBXcCVkBN}[email protected]}@[email protected][email protected]?I?G?][email protected]@[email protected]@[email protected]]?iBB}[email protected]@[email protected]@[email protected]@DSBWB{@[email protected]@[email protected]@[email protected]@XOH[[email protected][email protected][[email protected][[email protected][email protected]]SUMW[email protected]@[email protected]@[email protected][email protected][email protected]\"},\"start_location\":{\"lat\":23.7976518,\"lng\":90.423476},\"travel_mode\":\"DRIVING\",\"maneuver\":null},{\"distance\":{\"text\":\"76 m\",\"value\":76},\"duration\":{\"text\":\"1 min\",\"value\":11},\"end_location\":{\"lat\":23.8250745,\"lng\":90.4218806},\"html_instructions\":\"Keep <b>right</b> to continue toward <b>Tongi Diversion Rd</b>/<b>N3</b>\",\"polyline\":{\"points\":\"amlpCym{[email protected]\"},\"start_location\":{\"lat\":23.8256119,\"lng\":90.4215735},\"travel_mode\":\"DRIVING\",\"maneuver\":\"keep-right\"},{\"distance\":{\"text\":\"3.9 km\",\"value\":3884},\"duration\":{\"text\":\"6 mins\",\"value\":361},\"end_location\":{\"lat\":23.8502645,\"lng\":90.4085231},\"html_instructions\":\"Keep <b>left</b> at the fork and merge onto <b>Tongi Diversion Rd</b>/<b>N3</b><div style=\\\"font-size:0.9em\\\">Continue to follow N3</div>\",\"polyline\":{\"points\":\"uilpCwo{[email protected]^[email protected]^[email protected]@[email protected]@[email protected][email protected]@[email protected][email protected]][email protected]@[email protected]@B_E^wD\\\\gWfCaAH{E^{[email protected]@[email protected]@PoA\\\\_AX_A^[email protected]@[email protected]|@uB|A{[email protected]@[email protected]^sDtC_FzDoDrC[[email protected]@IFmCrByB`[email protected]@cCpBqBfB\"},\"start_location\":{\"lat\":23.8250745,\"lng\":90.4218806},\"travel_mode\":\"DRIVING\",\"maneuver\":\"fork-left\"},{\"distance\":{\"text\":\"2.2 km\",\"value\":2245},\"duration\":{\"text\":\"5 mins\",\"value\":304},\"end_location\":{\"lat\":23.8677906,\"lng\":90.4001691},\"html_instructions\":\"At the roundabout, take the <b>2nd</b> exit onto <b>Dhaka - Mymensingh Hwy</b>/<b>N3</b>\",\"polyline\":{\"points\":\"cgqpCg|[email protected][email protected]@[email protected]@[email protected]@[email protected][email protected]?C?A?C??AA?A?A?AAA?CACEQRkA|@qAbA{BdBwDtC{[email protected]`@uC|ByErDsB~A}D~C}AfAWR[[email protected]^[email protected]\\\\WLEBQH[LYLMD][email protected]{AP{@[email protected]@}BE{[email protected]?[[email protected]_AAqGS\"},\"start_location\":{\"lat\":23.8502645,\"lng\":90.4085231},\"travel_mode\":\"DRIVING\",\"maneuver\":\"roundabout-left\"},{\"distance\":{\"text\":\"0.6 km\",\"value\":646},\"duration\":{\"text\":\"2 mins\",\"value\":136},\"end_location\":{\"lat\":23.8672733,\"lng\":90.393847},\"html_instructions\":\"Turn <b>left</b> onto <b>Rabindra Sarani</b>\",\"polyline\":{\"points\":\"[email protected]|FDdAF`[email protected]@bB?N\"},\"start_location\":{\"lat\":23.8677906,\"lng\":90.4001691},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-left\"},{\"distance\":{\"text\":\"0.2 km\",\"value\":238},\"duration\":{\"text\":\"1 min\",\"value\":47},\"end_location\":{\"lat\":23.8694011,\"lng\":90.3937818},\"html_instructions\":\"Turn <b>right</b> onto <b>Lake Dr Rd</b>/<b>Road No 16</b>\",\"polyline\":{\"points\":\"mqtpCq`[email protected]@[email protected]\"},\"start_location\":{\"lat\":23.8672733,\"lng\":90.393847},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-right\"},{\"distance\":{\"text\":\"1.0 km\",\"value\":995},\"duration\":{\"text\":\"3 mins\",\"value\":166},\"end_location\":{\"lat\":23.869254,\"lng\":90.384},\"html_instructions\":\"Turn <b>left</b> onto <b>Gausul Azam Ave</b>\",\"polyline\":{\"points\":\"w~tpCc`vfP?\\\\[email protected][email protected]@[email protected]|[email protected][email protected]\"},\"start_location\":{\"lat\":23.8694011,\"lng\":90.3937818},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-left\"},{\"distance\":{\"text\":\"0.5 km\",\"value\":549},\"duration\":{\"text\":\"2 mins\",\"value\":111},\"end_location\":{\"lat\":23.8741914,\"lng\":90.3838579},\"html_instructions\":\"Turn <b>right</b> onto <b>Shah Makhdum Ave</b>\",\"polyline\":{\"points\":\"y}[email protected]}[email protected]?wAB\"},\"start_location\":{\"lat\":23.869254,\"lng\":90.384},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-right\"},{\"distance\":{\"text\":\"0.4 km\",\"value\":428},\"duration\":{\"text\":\"2 mins\",\"value\":90},\"end_location\":{\"lat\":23.8740955,\"lng\":90.3796571},\"html_instructions\":\"Turn <b>left</b> onto <b>Sonargaon Janapath</b>\",\"polyline\":{\"points\":\"u|up[email protected][email protected]\\\\?J\"},\"start_location\":{\"lat\":23.8741914,\"lng\":90.3838579},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-left\"},{\"distance\":{\"text\":\"0.1 km\",\"value\":141},\"duration\":{\"text\":\"1 min\",\"value\":40},\"end_location\":{\"lat\":23.8744586,\"lng\":90.3785946},\"html_instructions\":\"Turn <b>right</b> onto <b>Noyanogor Rd</b>\",\"polyline\":{\"points\":\"c|upC{[email protected]\\\\\"},\"start_location\":{\"lat\":23.8740955,\"lng\":90.3796571},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-right\"},{\"distance\":{\"text\":\"0.2 km\",\"value\":208},\"duration\":{\"text\":\"1 min\",\"value\":64},\"end_location\":{\"lat\":23.8761437,\"lng\":90.379075899999989},\"html_instructions\":\"Turn <b>right</b>\",\"polyline\":{\"points\":\"k~upCeasfP?P_AAO?IAIAaA][email protected]@[email protected]\"},\"start_location\":{\"lat\":23.8744586,\"lng\":90.3785946},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-right\"},{\"distance\":{\"text\":\"72 m\",\"value\":72},\"duration\":{\"text\":\"1 min\",\"value\":29},\"end_location\":{\"lat\":23.8758733,\"lng\":90.379545499999992},\"html_instructions\":\"Turn <b>right</b><div style=\\\"font-size:0.9em\\\">Destination will be on the right</div>\",\"polyline\":{\"points\":\"{hvpCgdsfPKEFO\\\\{@@[email protected]@[email protected]@@[email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected]??A?A\"},\"start_location\":{\"lat\":23.8761437,\"lng\":90.379075899999989},\"travel_mode\":\"DRIVING\",\"maneuver\":\"turn-right\"}],\"traffic_speed_entry\":[],\"via_waypoint\":[]}],\"overview_polyline\":{\"points\":\"uz}[email protected]@[email protected]@QaA{[email protected]@[email protected]@[email protected]@yC~AuB|@[email protected]_DrA{@[email protected][email protected]@[email protected][email protected]@[email protected]@K}@[email protected]{B}@[email protected]@[email protected]@[email protected]@uA_AeA}@[email protected]@[email protected]@QeAS]C][email protected]`[email protected]@[email protected]|[email protected]^[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected]}@[email protected]@[email protected]@][email protected]@[email protected]@[email protected][email protected]@[email protected]@@[[email protected]@TOdC_A|@S^MLK`@[email protected]@}@[email protected][[email protected]{@K{@[email protected]@[email protected]@[email protected]@FURmAD][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@EcB?gAFqB\\\\cIXyDRoABkCGmBEiBEqDU_CGmBG}@@[email protected]@[email protected]_E`@y[[email protected]@wD\\\\cJhA{QtBaK|A}[email protected]@[email protected]}LV{KRsB?}IHkFD}[email protected]@PmE`[email protected]@[email protected]\\\\[email protected]@][email protected][email protected]@[email protected][yCgAqA]oBY{[email protected][email protected]@[email protected]@[email protected]`@P^[email protected]@[email protected]@WT[[email protected]@[email protected]@[email protected]_]dD}[email protected]@[email protected][email protected]~B}[email protected]}C`CsHzFqKlIaTpPwGzEuA|@][email protected]}[email protected]@}BEaEI}@[email protected]\\\\bIJ|[email protected][email protected]?\\\\[email protected]``@@`[email protected][email protected]@TPBDYFYNY`@M`@[email protected]@iC_AKEFO^{@@@[email protected][email protected]\"},\"summary\":\"Bir Uttam Rafiqul Islam Ave and N3\",\"warnings\":[],\"waypoint_order\":[]}"

完整的JSON视图的Pastbin链接

我有格森图书馆。现在无法转换为Json对象来解析它。为了解析,我需要替换该String中的所有反斜杠。如何替换其中的所有反斜杠。

这是我的数据模型类

import java.util.List;
import com.google.gson.annotations.SerializedName;


public class DriverMyTripDataItem{
/**   job id     */
@SerializedName("Id")
private int id;

@SerializedName("DestinationLat")
private double destinationLat;

@SerializedName("IsRouteSelected")
private boolean isRouteSelected;

@SerializedName("DestinationLng")
private double destinationLng;

@SerializedName("StartTime")
private String startTime;

@SerializedName("EstimatedCost")
private double estimatedCost;

@SerializedName("VehicleId")
private int vehicleId;

@SerializedName("SourceName")
private String sourceName;

@SerializedName("SeatPlanJson")
private List<SeatPlanJsonItem> seatPlanJson;

@SerializedName("IsJobCancelled")
private boolean isJobCancelled;

@SerializedName("IsJobStarted")
private boolean isJobStarted;

@SerializedName("DriverId")
private String driverId;

@SerializedName("SourceLat")
private double sourceLat;

@SerializedName("Eta")
private double eta;

@SerializedName("IsJobCompleted")
private boolean isJobCompleted;

@SerializedName("TotalSeatBookingRequest")
private int totalSeatBookingRequest;

@SerializedName("DestinationName")
private String destinationName;

@SerializedName("SelectedRoute")
private Object selectedRoute;



@SerializedName("SourceLng")
private double sourceLng;

@SerializedName("EstimatedFuelConsumption")
private double estimatedFuelConsumption;

@SerializedName("JobCancellReason")
private Object jobCancellReason;

public void setDestinationLat(double destinationLat){
    this.destinationLat = destinationLat;
}

public double getDestinationLat(){
    return destinationLat;
}

public void setIsRouteSelected(boolean isRouteSelected){
    this.isRouteSelected = isRouteSelected;
}

public boolean isIsRouteSelected(){
    return isRouteSelected;
}

public void setDestinationLng(double destinationLng){
    this.destinationLng = destinationLng;
}

public double getDestinationLng(){
    return destinationLng;
}

public void setStartTime(String startTime){
    this.startTime = startTime;
}

public String getStartTime(){
    return startTime;
}

public void setEstimatedCost(double estimatedCost){
    this.estimatedCost = estimatedCost;
}

public double getEstimatedCost(){
    return estimatedCost;
}

public void setVehicleId(int vehicleId){
    this.vehicleId = vehicleId;
}

public int getVehicleId(){
    return vehicleId;
}

public void setSourceName(String sourceName){
    this.sourceName = sourceName;
}

public String getSourceName(){
    return sourceName;
}

public void setSeatPlanJson(List<SeatPlanJsonItem> seatPlanJson){
    this.seatPlanJson = seatPlanJson;
}

public List<SeatPlanJsonItem> getSeatPlanJson(){
    return seatPlanJson;
}

public void setIsJobCancelled(boolean isJobCancelled){
    this.isJobCancelled = isJobCancelled;
}

public boolean isIsJobCancelled(){
    return isJobCancelled;
}

public void setIsJobStarted(boolean isJobStarted){
    this.isJobStarted = isJobStarted;
}

public boolean isIsJobStarted(){
    return isJobStarted;
}

public void setDriverId(String driverId){
    this.driverId = driverId;
}

public String getDriverId(){
    return driverId;
}

public void setSourceLat(double sourceLat){
    this.sourceLat = sourceLat;
}

public double getSourceLat(){
    return sourceLat;
}

public void setEta(double eta){
    this.eta = eta;
}

public double getEta(){
    return eta;
}

public void setIsJobCompleted(boolean isJobCompleted){
    this.isJobCompleted = isJobCompleted;
}

public boolean isIsJobCompleted(){
    return isJobCompleted;
}

public void setTotalSeatBookingRequest(int totalSeatBookingRequest){
    this.totalSeatBookingRequest = totalSeatBookingRequest;
}

public int getTotalSeatBookingRequest(){
    return totalSeatBookingRequest;
}

public void setDestinationName(String destinationName){
    this.destinationName = destinationName;
}

public String getDestinationName(){
    return destinationName;
}

public void setSelectedRoute(Object selectedRoute){
    this.selectedRoute = selectedRoute;
}

public Object getSelectedRoute(){
    return selectedRoute;
}

public void setId(int id){
    this.id = id;
}

public int getId(){
    return id;
}

public void setSourceLng(double sourceLng){
    this.sourceLng = sourceLng;
}

public double getSourceLng(){
    return sourceLng;
}

public void setEstimatedFuelConsumption(double estimatedFuelConsumption){
    this.estimatedFuelConsumption = estimatedFuelConsumption;
}

public double getEstimatedFuelConsumption(){
    return estimatedFuelConsumption;
}

public void setJobCancellReason(Object jobCancellReason){
    this.jobCancellReason = jobCancellReason;
}

public Object getJobCancellReason(){
    return jobCancellReason;
}

@Override
public String toString(){
    return 
        "DataItem{" + 
        "destinationLat = '" + destinationLat + '\'' + 
        ",isRouteSelected = '" + isRouteSelected + '\'' + 
        ",destinationLng = '" + destinationLng + '\'' + 
        ",startTime = '" + startTime + '\'' + 
        ",estimatedCost = '" + estimatedCost + '\'' + 
        ",vehicleId = '" + vehicleId + '\'' + 
        ",sourceName = '" + sourceName + '\'' + 
        ",seatPlanJson = '" + seatPlanJson + '\'' + 
        ",isJobCancelled = '" + isJobCancelled + '\'' + 
        ",isJobStarted = '" + isJobStarted + '\'' + 
        ",driverId = '" + driverId + '\'' + 
        ",sourceLat = '" + sourceLat + '\'' + 
        ",eta = '" + eta + '\'' + 
        ",isJobCompleted = '" + isJobCompleted + '\'' + 
        ",totalSeatBookingRequest = '" + totalSeatBookingRequest + '\'' + 
        ",destinationName = '" + destinationName + '\'' + 
        ",selectedRoute = '" + selectedRoute + '\'' + 
        ",id = '" + id + '\'' + 
        ",sourceLng = '" + sourceLng + '\'' + 
        ",estimatedFuelConsumption = '" + estimatedFuelConsumption + '\'' + 
        ",jobCancellReason = '" + jobCancellReason + '\'' + 
        "}";
    }
}
帕尔文·阿克特(Parveen Akter)

使用String代替Object。写下面的代码

@SerializedName("SelectedRoute")
private String selectedRoute 

代替

  @SerializedName("SelectedRoute")
  private Object selectedRoute;

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

将JSON字符串解析为JavaScript中的特定对象原型

将包含另一个JSON字符串的JSON对象解析为一个对象

JSON解析,字符串到对象,(“无法将JSON对象转换为JSON数组”)

golang将复杂的字符串解析为json

我可以将json解析为字符串还是其他具体类型作为对象?

将JSON对象/字符串数组解析为新的Custom类

使用PowerShell无法将字符串解析为对象

C#无法将JSON解析为字符串

无法将json文件字典中的重复字符串解析为键/值对

将字符串解析为JSON

将JSON对象解析为Java中的字符串

将字符串转换或解析为JSON对象

将字符串解析为对象

将字符串解析为JSON

将字符串解析为JSON

将JSON查询字符串解析为JSON对象

将NSDictionary的JSON字符串解析为对象数组Object C

android,gson无法将json字符串解析为java对象

无法将JSON字符串解析为GWT中的Java / JavaScriptObject

如何将特殊字符串解析为JSON?

无法将 json 字符串转换为 json 对象

将未标记的 JSON 字符串解析为 java 对象

将 JSON 从字符串解析为对象

使用 Jackson 将 Json 字符串解析为 Kotlin 对象抛出 InvalidDefinitionException

Nodejs - 将字符串解析为 JSON 对象

Gson 无法将位于 json 对象中的 json 数组字符串解析为 JsonArray

将 JSON 字符串解析为具有精确值的 javascript 对象

将 Javascript 对象解析为类似 JSON 的字符串,但使用单引号

无法将字符串解析为 JSON