title: How to unescape json?
body: <p>I have an escaped json string, like</p>
  
  <pre><code>{\"uid\":\"93\",\"channel_origin\":\"\",\"sys_ver\":\"12.2\",\"carrier_network_code\":\"02\",\"rpn\":\"\\u9996\\u9875\",\"app_ver\":\"9.3.8\",\"event_time\":1556119062,\"carrier\":\"\\u4e2d\\u56fd\\u79fb\\u52a8\",\"event_guid\":\"E36FE60BFBFF405680906E3F95EC3953\",\"ppn\":\"\\u542f\\u52a8\",\"device_token\":\"d323828f196a3ca665fa296a2a5f23a57cce83963328b73bd2cf78a7d55575ef\",\"day_first\":\"442\",\"abtest\":\"{\\\"app_home_change\\\":\\\"b\\\",\\\"app_icon_change\\\":\\\"b\\\"}\",\"pn\":\"\\u9996\\u9875\",\"puri\":\"http:\\/\\/app.mafengwo.cn\\/launch\",\"day_before\":\"1\",\"hardware_model\":\"iPhone10,3\",\"lng\":\"114.427362\",\"launch_guid\":\"69904D0912C943AC9D924AC8469CEA4E\",\"app_code\":\"cn.mafengwo.www\",\"_launch_source_history\":\"[]\",\"idfv\":\"20587F0C-0F6E-4CD2-94C3-CE3A10CF0EFD\",\"open_udid\":\"72F69B19-E612-4A4B-9D2F-8BB6C890421B\",\"carrier_country_code\":\"cn\",\"dev_ver\":\"D1908.0\",\"device_type\":\"ios\",\"ref\":\"http:\\/\\/app.mafengwo.cn\\/index?banner=1&amp;channel_id=55&amp;theme=1\",\"lat\":\"27.818787\",\"event_code\":\"show_index\",\"idfa\":\"DC7D35C1-C81B-4884-96C5-C6BAE83FA7DA\",\"uri\":\"http:\\/\\/app.mafengwo.cn\\/index?banner=1&amp;channel_id=55&amp;theme=1\",\"channel_code\":\"\",\"net\":\"1\",\"_is_foreground\":\"1\",\"sdk_ver\":\"20161011\",\"_event_hash\":\"8ae3b940026375b8252e689113fc8c43f5bfddcf\",\"ip\":\"39.176.24.64\",\"umddid\":14696,\"topic\":\"mobile_event\",\"ctime\":1556119062,\"ip_s\":\"node001026\",\"datetime\":\"2019-04-24T23:17:42+08:00\",\"uuid\":\"5c5ae87c-3b8b-2786-45b8-b16b969f8e7a\",\"hour\":\"23\",\"dt\":\"20190424\",\"minute\":\"17\",\"user_agent\":\"Safari Mozilla\\/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit\\/605.1.15 (KHTML, like Gecko) Mobile\\/15E148 mfwappcode\\/cn.mafengwo.www mfwappver\\/9.3.8 mfwappdevver\\/D1908.0 mfwjssdk\\/1.1 mfwappjsapi\\/1.7\",\"mfw_env\":\"product\",\"attr\":{\"_tpt\":\"\\u4fe1\\u606f\\u6d41\",\"prm_id\":\"\",\"_tpa\":\"\\u542f\\u52a8_\\u9996\\u9875\",\"item_name\":\"\\u673a\\u7968\\u706b\\u8f66\\u7968\",\"item_source\":\"\",\"_turi\":\"http:\\/\\/app.mafengwo.cn\\/index?banner=1&amp;channel_id=55&amp;theme=1\",\"_tp\":\"\\u9996\\u9875\",\"item_id\":\"\",\"item_uri\":\"http:\\/\\/m.mafengwo.cn\\/nb\\/public\\/sharejump.php?type=1500&amp;source=app_home\",\"_tid\":\"B66086D2EA134BB3B7C957636E5F011C\",\"item_type\":\"\",\"_tpos\":\"index.index.index_icon.2\",\"show_cycle_id\":\"30261740-A01E-46D5-BBF7-24713BF03F69\",\"_tl\":\"1\",\"_tpre\":\"{\\\"_turi\\\":\\\"http:\\\\\\/\\\\\\/app.mafengwo.cn\\\\\\/launch\\\",\\\"_tl\\\":\\\"0\\\",\\\"_tp\\\":\\\"\\u542f\\u52a8\\\",\\\"_tid\\\":\\\"C71450F83A6340A3BD9093E41D71FA42\\\",\\\"_tpi\\\":\\\"\\u542f\\u52a8\\\",\\\"_tpt\\\":\\\"\\u6b63\\u5e38\\\"}\",\"pos_id\":\"index.index.index_icon.2\",\"_tpi\":\"40A0CE0E1CB243A399F70BEFDA8A5789\",\"module_name\":\"\\u997c\\u56fe\",\"sign_valid\":1,\"_client_upload_time\":1556119062,\"_dc_collect_audit_sdk_in\":1556119062335,\"_dc_collect_audit_sdk_out\":1556119062347}}
  </code></pre>
  
  <p>I can unescape it on this <a href="https://www.freeformatter.com/json-escape.html#ad-output" rel="nofollow noreferrer">site</a>, which produces valid json:</p>
  
  <pre><code>{
    "uid": "93",
    "channel_origin": "",
    "sys_ver": "12.2",
    "carrier_network_code": "02",
    "rpn": "首页",
    "app_ver": "9.3.8",
    "event_time": 1556119062,
    "carrier": "中国移动",
    "event_guid": "E36FE60BFBFF405680906E3F95EC3953",
    "ppn": "启动",
    "device_token": "d323828f196a3ca665fa296a2a5f23a57cce83963328b73bd2cf78a7d55575ef",
    "day_first": "442",
    "abtest": "{\"app_home_change\":\"b\",\"app_icon_change\":\"b\"}",
    "pn": "首页",
    "puri": "http://app.mafengwo.cn/launch",
    "day_before": "1",
    "hardware_model": "iPhone10,3",
    "lng": "114.427362",
    "launch_guid": "69904D0912C943AC9D924AC8469CEA4E",
    "app_code": "cn.mafengwo.www",
    "_launch_source_history": "[]",
    "idfv": "20587F0C-0F6E-4CD2-94C3-CE3A10CF0EFD",
    "open_udid": "72F69B19-E612-4A4B-9D2F-8BB6C890421B",
    "carrier_country_code": "cn",
    "dev_ver": "D1908.0",
    "device_type": "ios",
    "ref": "http://app.mafengwo.cn/index?banner=1&amp;channel_id=55&amp;theme=1",
    "lat": "27.818787",
    "event_code": "show_index",
    "idfa": "DC7D35C1-C81B-4884-96C5-C6BAE83FA7DA",
    "uri": "http://app.mafengwo.cn/index?banner=1&amp;channel_id=55&amp;theme=1",
    "channel_code": "",
    "net": "1",
    "_is_foreground": "1",
    "sdk_ver": "20161011",
    "_event_hash": "8ae3b940026375b8252e689113fc8c43f5bfddcf",
    "ip": "39.176.24.64",
    "umddid": 14696,
    "topic": "mobile_event",
    "ctime": 1556119062,
    "ip_s": "node001026",
    "datetime": "2019-04-24T23:17:42+08:00",
    "uuid": "5c5ae87c-3b8b-2786-45b8-b16b969f8e7a",
    "hour": "23",
    "dt": "20190424",
    "minute": "17",
    "user_agent": "Safari Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 mfwappcode/cn.mafengwo.www mfwappver/9.3.8 mfwappdevver/D1908.0 mfwjssdk/1.1 mfwappjsapi/1.7",
    "mfw_env": "product",
    "attr": {
      "_tpt": "信息流",
      "prm_id": "",
      "_tpa": "启动_首页",
      "item_name": "机票火车票",
      "item_source": "",
      "_turi": "http://app.mafengwo.cn/index?banner=1&amp;channel_id=55&amp;theme=1",
      "_tp": "首页",
      "item_id": "",
      "item_uri": "http://m.mafengwo.cn/nb/public/sharejump.php?type=1500&amp;source=app_home",
      "_tid": "B66086D2EA134BB3B7C957636E5F011C",
      "item_type": "",
      "_tpos": "index.index.index_icon.2",
      "show_cycle_id": "30261740-A01E-46D5-BBF7-24713BF03F69",
      "_tl": "1",
      "_tpre": "{\"_turi\":\"http:\\/\\/app.mafengwo.cn\\/launch\",\"_tl\":\"0\",\"_tp\":\"启动\",\"_tid\":\"C71450F83A6340A3BD9093E41D71FA42\",\"_tpi\":\"启动\",\"_tpt\":\"正常\"}",
      "pos_id": "index.index.index_icon.2",
      "_tpi": "40A0CE0E1CB243A399F70BEFDA8A5789",
      "module_name": "饼图",
      "sign_valid": 1,
      "_client_upload_time": 1556119062,
      "_dc_collect_audit_sdk_in": 1556119062335,
      "_dc_collect_audit_sdk_out": 1556119062347
    }
  }
  </code></pre>
  
  <p>But how can I do it in Java?</p>
  
  <p>I have tried <code>StringEscapeUtils.unescapeJava</code> of apache commons, but it produce something like:</p>
  
  <pre><code>{"channel_origin":"","sys_ver":"12.1.4","carrier_network_code":"00","rpn":"?????","app_ver":"9.3.8","event_time":1556118681,"carrier":"????","event_guid":"EE9ED76F27FC4CCB855ADC80B03E4757","ppn":"??","device_token":"9244d63150045f19f53980eb617b25755f444cb94a5a24b761d6e0b711ecb5be","day_first":"4","abtest":"{"app_home_change":"b","app_icon_change":"a"}","pn":"??","puri":"http://app.mafengwo.cn/launch","day_before":"1","hardware_model":"iPhone11,8","lng":"121.512072","launch_guid":"17787EB05F5C4B12A5BE9C6939725A07","app_code":"cn.mafengwo.www","_launch_source_history":"[]","idfv":"26E08BD5-6F71-4ABB-8F76-4DFC181F930A","open_udid":"FC07FB12-C1BD-4307-8B51-00E3E76D35E1","carrier_country_code":"cn","dev_ver":"D1908.0","device_type":"ios","ref":"http://app.mafengwo.cn/launch/ads","lat":"31.071058","event_code":"show_index","idfa":"FC07FB12-C1BD-4307-8B51-00E3E76D35E1","uri":"http://app.mafengwo.cn/index?banner=0&amp;channel_id=55&amp;theme=0","channel_code":"","net":"4","_is_foreground":"1","sdk_ver":"20161011","_event_hash":"5b788e9db5623e5bd1f90d7b52991bba889bf425","ip":"117.136.8.71","umddid":10099,"topic":"mobile_event","ctime":1556118694,"ip_s":"node011107","datetime":"2019-04-24T23:11:34+08:00","uuid":"5cbb0cbe-7620-dd88-9cbb-f4942994e47c","hour":"23","dt":"20190424","minute":"11","user_agent":"Safari Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16D57 mfwappcode/cn.mafengwo.www mfwappver/9.3.8 mfwappdevver/D1908.0 mfwjssdk/1.1 mfwappjsapi/1.7","mfw_env":"product","attr":{"_tpt":"???","prm_id":"","_tpa":"??_??","item_name":"?????","item_source":"","_turi":"http://app.mafengwo.cn/index?banner=0&amp;channel_id=55&amp;theme=0","_tp":"??","item_id":"","item_uri":"http://m.mafengwo.cn/nb/public/sharejump.php?type=1500&amp;source=app_home","_tid":"378862F0BE7E437D874782155EAA5980","item_type":"","_tpos":"index.index.index_icon.2","show_cycle_id":"5C3BE7DF-B62F-4F78-A878-D178D3710649","_tl":"1","_tpre":"{"_turi":"http:\/\/app.mafengwo.cn\/launch","_tl":"0","_tp":"??","_tid":"39E918A8F82D44E7B7A8BF122CFA235E","_tpi":"??","_tpt":"??"}","pos_id":"index.index.index_icon.2","_tpi":"2D898392135245F49055797FEC4FED7C","module_name":"??","sign_valid":1,"_client_upload_time":1556118693,"_dc_collect_audit_sdk_in":1556118694452,"_dc_collect_audit_sdk_out":1556118694488}}
  </code></pre>
  
  <p>which change <code>\\\"</code> to <code>"</code>, instead the right one <code>\"</code>.</p>