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 }
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; }