2017-03-02 30 views
-1

我從這樣的網絡服務獲取數據,如http://prntscr.com/ef2hs5。 現在我想從中獲得價值。從java中刪除json的逃生

我嘗試使用下面的代碼:

 JSONObject jsonObject = new JSONObject(ResponseDeleteAddress); 
      String orderId = jsonObject.getString("orderId"); 
      String bigString = orderId.replace("\\\"", "\""); 
+0

通常應該從服務器端固定。 – DEADMC

+0

@Deepanshi Gupta問你想要的問題,不要毆打布什顯示你擁有的絃樂和你想要得到的結果! –

+0

「\」orderId \「:\」152 \「」這是我的回覆@Charuක –

回答

1

試試這個代碼,如果它的幫助。

JSONObject jsonObject = new JSONObject(ResponseDeleteAddress); 
    String orderId = jsonObject.getString("orderId").replace("\\", "");