如何解析json映射有一些特殊字符

时间:2019-01-04 13:46:54

标签: json jsonparser

  

无法解析带有特殊字符的json。

Json结构如下-

  {  
  "START_TIME":"03:45",
  "SHIFT_START_TIME":"07:00 AM",
  "SELECT_STORE3_BO":"000951, Test store 20",
  "SELECT_STORE5_BO":"26482, TAMPA PALMS",
  "SCHEDULE_CREATION_DATE":"EST5EDT_TIME_ZONE_DATE",
  "SELECT_STORE1_BO":"000951, 000951-Grand Junction, CO",
  "SHIFT_END_TIME_INVALID":"55454545",
  "END_DATE":"EST5EDT_TIME_ZONE_DATE-30",
  "TEXT_MSG_UNPOST":"Week unposted",
  "SHIFT_START_TIME_INVALID":"1121212221",
  "END_DATE_1":"EST5EDT_TIME_ZONE_DATE",
  "SHARED_STORE":"002080, 002080-Grand Junction, CO",
  "SELECT_JOB_TITLE_1":"BIRTHDAY PARTIES(5★)"
   }

我解析json的代码如下-

     JSONParser parser=new JSONParser();
     JSONObject object=(JSONObject) parser.parse(new InputStreamReader(new FileInputStream("Data.json")));
     System.out.println(object.get("SHARED_STORE"));

0 个答案:

没有答案