Example #1
0
    public void send(DebuggerMessage debuggerMessage, boolean immediate) {
      String jsonString = JsonUtil.streamAwareToJson(debuggerMessage);
      Message message = new Message(Collections.<String, String>emptyMap(), jsonString);

      outputConnection.send(message);
      // TODO(peter.rybin): support {@code immediate} in protocol
    }
Example #2
0
 private JSONObject parseJson(String semiJson) {
   String jsonString = semiJson.replace('\'', '"');
   JSONObject json;
   try {
     json = JsonUtil.jsonObjectFromJson(jsonString);
   } catch (ParseException e) {
     throw new RuntimeException(e);
   }
   return json;
 }