List of usage examples for javax.json JsonException printStackTrace
public void printStackTrace()
From source file:com.mac.holdempoker.socket.MessageDecoder.java
/** * Checks whether the input can be turned into a valid Message object * in this case, if we can read it as a Json object, we can. * @param string//from w ww. j a v a 2 s . c o m * @return */ @Override public boolean willDecode(String string) { try { Json.createReader(new StringReader(string)).read(); return true; } catch (JsonException ex) { ex.printStackTrace(); return false; } }
From source file:org.sample.whiteboard.FigureDecoder.java
@Override public boolean willDecode(String string) { try {//w w w .j av a 2 s .c om Json.createReader(new StringReader(string)).readObject(); return true; } catch (JsonException ex) { ex.printStackTrace(); return false; } }